Page History
...
Three types of datasources can be configured in the Java web application: JDBC, ODBC and JNDI. A datasource must be defined in the aquima.properties file.
Include Page | ||||
---|---|---|---|---|
|
...
Using the properties file
Configuring a JDBC datasource
Configuring a datasource named datasource_name must be done by setting the following mandatory properties:
Code Block | ||
---|---|---|
| ||
connection.datasource_name.sql.type=jdbc connection.datasource_name.sql.url= connection.datasource_name.sql.driver= connection.datasource_name.sql.username= 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 |
---|
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 http://commons.apache.org/proper/commons-dbcp/configuration.html. |
Configuring a ODBC datasource
...
Overview
Content Tools