Skip to main content
Version: 7.2402.x.x RR

JDBCConnectionPool

The JDBCConnectionPool provides JDBC connections for DataSource and/or DataSink implementations which need access to databases. It implements the javax.sql.DataSource interface and does connection pooling. Connection pooling is implemented by the c3p0 library.

The JDBCConnectionPool only has a minimal set of configuration parameters which are connection pooling related, but this can be easily extended.

Configuration

NameType, usage constraints, defaultsDescription
driverrequired: paraVal
default: none
type: classname of the JDBC driver
Classname of the JDBC driver to use. This depends on your database (e.g., use oracle.jdbc.OracleDriver for Oracle databases). You have to make sure that the configured class is found on the classpath of the nevisDataPorter.
connectionUrlrequired: paraVal
default: none
type: connection URL
The connection URL to be passed to the JDBC driver to establish a connection.
usernameoptional: paraVal
default: none
type: string
The connection username to be passed to our JDBC driver to establish a connection.
passwordoptional: paraVal
default: none
type: string
sensitive: true
The connection password to be passed to our JDBC driver to establish a connection.
poolsizeoptional: paraVal
default: 8
type: int
The maximum number of active connections that can be allocated from this pool at the same time, or a negative value for no limit. Connection pooling is disabled if a poolsize of zero is used.
connectionPropertiesoptional: paraMap
default: none
type: name value pairs where the type is defined by the driver implementation
Adds a custom connection property to the set that will be passed to the JDBC driver.

Example

<object type="JDBCConnectionPool" name="hsqlConnection">
<dp:paraVal name="connectionUrl" value="jdbc:hsqldb:hsql://localhost:9111"/>
<dp:paraVal name="username" value="SA"/>
<dp:paraVal name="password" value=""/>
<dp:paraVal name="driver" value="org.hsqldb.jdbcDriver"/>
<dp:paraMap name="connectionProperties"
<value name="javax.net.ssl.trustStore" value="${cfg.truststore}"/>
<value name="javax.net.ssl.trustStoreType" value="JKS"/>
</dp:paraMap>
</object>