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 aquima.properties file. The Development plugin
Include Page | ||||
---|---|---|---|---|
|
The following sections document all the configuration values available when using the properties file and provide a brief overview of using the development plugin for managing the datasources.
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= |
The value of these parameters depend on which type of database the connection is made to, so details can be found in the documentation specific to the database type.
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 |
---|
Not setting a connection pool optional parameter results in a DEBUG message in the log in the form: SqlConnectionData datasource_name has no poolMaxTotal property set explicitly. Default value 8 will be used. Setting a connection poolparameterto an invalid value will result in a WARNING message in the log in the form: SqlConnectionData datasource_name was initialized with poolMaxTotal=eight, but it is not a valid number. Default value 8 will be used. |
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.
...