When the Runtime needs a connection to a JDBC Database, it will open a new connection, perform the operation, and then close it at the end of the session.
The same behavior applies for all the operations on the Runtime's Log Database.
This is the default behavior, which can be modified in properties to enable connection pooling to mutualize connections, as explained in this article.
Activating this mode can help to reduce the amount of connections performed and also to avoid overloading the databases with connections initializations.
Prerequisites:
- Stambia DI Runtime S17.5.3 or higher (pool for JDBC Databases)
- Stambia DI Runtime S17.5.4 or higher (pool for Runtime Log Database)
How it works
When connection pooling is enabled, the Runtime will mutualize the connections performed to JDBC databases between executions.
Instead of closing them at the end of sessions, it will keep them and let them open for any further operations.
When a session needs a connection, it will look if one is available in the pool of connection, use it if it is the case, or open a new one if not.
Note that the Runtime will automatically close the connections that have not been used since more than 60 minutes.
The check is performed every 20 minutes, and the Runtime closes 3 connections maximum at each check.
Configuration
All the configuration is performed in the properties/engineParameters.xml
file, which provide commented examples of the options.
Enabling connection pooling for JDBC Databases connections
To enable connection pooling for the operations performed by the Runtime on JDBC databases, simply add / uncomment the following parameter.
<parameters>
<...>
<engineParameters>
<...>
<parameter name="enableConnectionPoolForJdbcDatabases" value="true"/>
<...>
</engineParameters>
<..>
</parameters>
Prerequisites:
- Stambia DI Runtime S17.5.3 or higher
Enabling connection pooling for Log Database connections
To enable connection pooling for the operations performed by the Runtime on its Log Database, simply add / uncomment the following parameter.
<parameters>
<...>
<engineParameters>
<...>
<parameter name="enableConnectionPoolForLogDatabase" value="true"/>
<...>
</engineParameters>
<..>
</parameters>
Prerequisites:
- Stambia DI Runtime S17.5.4 or higher