How to enable database connection checks for Database Concepts (DBConcepts) in TIBCO BusinessEvents (BE)

How to enable database connection checks for Database Concepts (DBConcepts) in TIBCO BusinessEvents (BE)

book

Article ID: KB0075018

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.x

Description

By default database connections are not validated and refreshed (if connection test failed) by a background process. 

Issue/Introduction

By default when using DB concepts the database connections are not validated and refreshed (if connection test failed) by a background process.

Environment

All Operating Systems

Resolution

To enable the connection check add below properties in CDD file.

1.
be.dbconcepts.connections.checkall=true
Property must set to true to enable DBConnection checks for DBConcepts

2.
be.dbconcepts.connection.check.interval=<intervalInSecs>
Interval at which BE agent checks the connections in DB connection pool of DBConcepts.
The agent only checks the connections that aren't in use currently.

3.
be.dbconcepts.connections.checkratio=<number>
The BE agent does not check all connections on each check interval, it only checks for a specific number of connections controlled by this property, the formula used is
(percentage of connections, 1/<number>*100).
To check all connections on each interval set checkRatio to 1.
To check 20% of the connections set it to 5 (default).

4.
be.dbconcepts.test.connections.sql=<SQLstatement executed for the check>
Be creates/uses a default statement for Oracle and SQLServer databases (DB), but you overwrite/define the SQL statment used for the connection test.
The property is required for Postgres DB (sample SQL: Select 1).

5. Optional:
Add below property to record DBConnection check in BE log. 
be.dbconcepts.connections.logall=true
Note:
The logs created only when logLevel set to debug or higher.
For Oracle databases that property not work (CR: BE-28360)


e.g. (sample set of properties to check all connections every 100 secs):
<property name="be.dbconcepts.connections.checkall" value="true"/>
<property name="be.dbconcepts.connection.check.interval" value="100"/>
<property name="be.dbconcepts.connections.checkratio" value="1"/>
<property name="be.dbconcepts.test.connections.sql" value="select 1"/>
<property name="be.dbconcepts.connections.logall" value="true"/>        
 

Additional Information

DBConcepts, Database connections