I'd like to have confirmation about the following steps in regards to behavior of the connection pool in 5.3.3:
Step1 : Tomcat starts and rule service starts.
Step2 : The connection between service and Oracle is established.
Step3 : Pool is established for every Decision Service. [ Decision Service is from RuleSet ]
In other words, a decision service has one pool assigned.
[ In the case of V4.3, the default DBCP-pool size is five. ]
Step4 : Running rule service by keeping those connection and used by service-call-transactions.
Step5 : The connection is disconnected after rule service stops. [ Tomcat stops ]
In V4.3, DBCP pool of Apache is used and V5.3 uses Hibernate instead of JPOX [ as in V4.3 ]. I'm looking to see if the pool handling is different in 5.3.
Environment specifications:
Corticon Server is deployed to Tomcat and made as a service on Linux. Some RuleSets using EDC are deployed into Corticon Server. Database is Oracle11g.
Corticon 5.3.3 is by default configured to use c3p0 connection pooling.
The connection pooling can be configured by setting properties in the Vocabulary editor's Database Access tab. Users can configure minimum size (hibernate.c3p0.min_size), maximum size (hibernate.c3p0.max_size), timeout (hibernate.c3p0.timeout) and the size of PreparedStatement cache (hibernate.c3p0.max_statements). c3p0 can also be disabled (hibernate.use.c3p0.connection_pool).
The list of the properties and their default values can be found in Corticon Integration and Deployment guide. More information about c3p0 can be found here: http://www.mchange.com/projects/c3p0/index.html#appendix_d
The connection pooling is managed by Hibernate, which means that pools are not created for every Decision Service. With the default configuration the server will start three connections and as needed it will create new connections up to max size (100). When a connection is not used for the specified timeout (1800 seconds) the pool will close it.