Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
_PropertiesFileJava
_PropertiesFileJava
 file. The Development plugin provides a web UI for modifying the properties file and can be used instead of editing the file directly.

...

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
languagejava
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:

ParameterDefaultDescription
poolInitialSize0The initial number of connections that are created when the pool is started.
poolMaxTotal8The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.
poolMaxIdle8The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit.
poolMinIdle0The minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none.
poolMaxWait-1The 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
titleDisclaimer

The descriptions above and the default values are taken from http://commons.apache.org/proper/commons-dbcp/configuration.html.

 

Configuring a ODBC datasource

...