JDBC connection properties
The optional <connection-properties
> parameter block in the configuration can be used to define
JDBC connection properties parameters to be used when connecting to the data
sources of the given type. A typical use case is to specify encryption and
integrity checksum algorithms for secure database connections.
Each connection property consists of a key-value pair. The syntax for specifying JDBC connection properties for a connection pool is shown in the configuration example below.
If you need different JDBC connection properties for different data
sources of the same type, just duplicate the
<jdbc-type-setting
> configuration, rename the
configurations for each variant needed, and define the proper JDBC connection
properties. Make sure to update any already existing data sources so that they
are of the correct type.
oracle
. This example creates an encrypted connection to
the database.
<jdbc-type-settings>
<type-name>oracle</type-name>
<driver>oracle.jdbc.OracleDriver</driver>
<connection-urlpattern>jdbc:oracle:thin:@<host>:<port1521>:<sid></
connection-url-pattern>
<ping-command>SELECT 1 FROM DUAL</ping-command>
<connection-properties>
<connection-property>
<key>oracle.net.encryption_client</key>
<value>REQUIRED</value>
</connection-property>
<connection-property>
<key>oracle.net.encryption_types_client</key>
<value>( 3DES168 )</value>
</connection-property>
<connection-property>
<key>oracle.net.crypto_checksum_client</key>
<value>REQUIRED</value>
</connection-property>
<connection-property>
<key>oracle.net.crypto_checksum_types_client</key>
<value>( MD5 )</value>
</connection-property>
</connection-properties>
...
</jdbc-type-settings>