How to configure extra parameters to your database connection in Bonita?

marielle.spiteri's picture
marielle.spiteri
Blog Categories: 

Component: Bonita | Version: 7.4+ | Edition: Subscription

Question

How do I configure my database connection to handle my Oracle RAC, or my MySQL Database encoding?

Answer

You will have to add your configuration to the file internal.properties located at the root of the setup folder, i.e: BonitaSubscription-7.9.4-tomcat/setup/internal.properties

Important: First of all, as explained in the header of the file, this file should not be modified manually in most cases, unless you know exactly what you are doing.

The file internal.properties: is used internally by the setup tool to properly configure and initialize the bundle. It is made of both data entered in database.properties as well as other data like database driver class name, connection URL, etc. This file should not be modified manually in most cases, unless for specific use-cases like adding parameters in the connection URL or using a specific database driver.

This file contains the Database configuration information that are not inside file database.properties (database driver class name, connection URL, etc).
Those information are used internally by the tool to configure properly the bundle + the setup initialization procedure. They use the values provided in file database.properties as replacement strings to build new values that will be injected in the tool.

Usage

You are allowed to modify these values if, for instance, for Oracle RAC, you need to add parameters in the connection URL, or for MySQL you need to add characterEncoding or other parameter.

Or also if you need to use a specific database Driver java class name.

But in most cases, you don't need to modify this file.

Examples:

- Example : Oracle RAC:

oracle.url=jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)(port=${db.server.port})(host=${db.server.name})))(connect_data=(INSTANCE_NAME=${db.database.name}))(source_route=yes))

oracle.bdm.url=jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)(port=${bdm.db.server.port})(host=${bdm.db.server.name})))(connect_data=(INSTANCE_NAME=${bdm.db.database.name}))(source_route=yes))

- Example : Oracle with ServiceName instead of SID:
In this case, the database.name in the database.properties file contains the ServiceName instead of the SID.

oracle.url=jdbc:oracle:thin:@//${db.server.name}:${db.server.port}/${db.database.name}

oracle.bdm.url=jdbc:oracle:thin:@//${bdm.db.server.name}:${bdm.db.server.port}/${bdm.db.database.name}

- Example : MySQL with characterEncoding:

mysql.url=jdbc:mysql://${db.server.name}:${db.server.port}/${db.database.name}?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8&profileSQL=true

mysql.bdm.url=jdbc:mysql://${bdm.db.server.name}:${bdm.db.server.port}/${bdm.db.database.name}?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8&profileSQL=true
Notifications