Page History
Introduction
Three Two types of datasources can be configured in the Java web applicationRuntime: JDBC , ODBC and JNDI. A datasource must be defined in the
Include Page | ||||
---|---|---|---|---|
|
...
Info | ||
---|---|---|
| ||
This page describes only how a datasource is configured. Using the datasource is outside the scope of this page. Check the documentation of the plugin you intend to use for information on how a datasource is supposed to be used. |
UI Text Box | ||
---|---|---|
| ||
When configuring the datasources for both the ProcessCaseDao and the AggregateDao, please make sure they have separate datasources. Using the same datasource is known to cause errors. |
Using the properties file
Configuring a JDBC datasource
Configuring a JDBC datasource named datasource_name must be done by setting the following mandatory properties:
Code Block | ||
---|---|---|
| ||
blueriq.connection.datasource_name.sql.type=jdbc blueriq.connection.datasource_name.sql.url= blueriq.connection.datasource_name.sql.driver= blueriq.connection.datasource_name.sql.username= blueriq.connection.datasource_name.sql.password= |
...
A number of optional parameters exist for configuring the connection pool settings. They can be used in constructs similar to
Code Block |
---|
blueriq.connection.datasource_name.sql.poolInitialSize=5 |
The parameters are:
Parameter | Default | Description |
---|---|---|
poolInitialSize | 0 | The initial number of connections that are created when the pool is started. |
poolMaxTotal | 8 | The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit. |
poolMaxIdle | 8 | The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit. |
poolMinIdle | 0 | The minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none. |
poolMaxWait | -1 | The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely. |
Info | ||
---|---|---|
| ||
The descriptions above and the default values are taken from the Apache Commons DBCP website. |
...
Info |
---|
Using the development plugin settings always creates the optional settings in the properties file. See more details in the development plugin section. |
...
Configuring an ODBC datasource
Configuring an ODBC datasource named datasource_name must be done by setting the following mandatory properties:
Code Block | ||
---|---|---|
| ||
blueriq.connection.datasource_name.sql.type=odbc blueriq.connection.datasource_name.sql.database= blueriq.connection.datasource_name.sql.username= blueriq.connection.datasource_name.sql.password= |
Configuring a JNDI datasource
Configuring a JNDI datasource named datasource_name must be done by setting the following mandatory properties:
Code Block | ||
---|---|---|
| ||
blueriq.connection.datasource_name.sql.type=jndi blueriq.connection.datasource_name.sql.jndi=jndi_resource_name |
The procedure of creating a JNDI datasource is container-specific. Please consult the documentation of the application server running the application on how to create a JNDI datasource.
Using the development plugin
Assuming the Development plugin is installed, the Settings widget can be started by using the button in the top right corner of the dashboard (see Using the development dashboard).
The Connections tab will show all the available connections. Managing the database connections is done in the Sql section.
To add a new connection, use the New Sql connection section at the bottom of the page, provide a name for the new connection and click Add new connection. Creating a new JDBC connection named datasource_name should yield the following result:
Info |
---|
Using the tooltips provides extra information about what each setting does. |
...
.