0 Replies Latest reply on Dec 30, 2014 10:59 AM by akoskm

    Bitronix and c3p0 connection pools

    akoskm

      Currently we are using c3p0 for connection pool.

      Every time we call taskService.complete the engine opens a new connection for every db insert.

      The number of db inserts depends on the size of the HashMap passed to the complete method.

       

      We have user tasks with 20+ input fields, they spawn about 20 separate connections every time we call taskService.complete.

      Simply increasing the pool size could solve this problem but I think that taskService.complete could happen with one connection.

       

      We've also noticed that with the default PooledDataSource (Bitronix) this problem doesn't exist and the pool handles those 20 inserts in one connection.

       

      The reason why we switched to c3p0 was this:

      Long term out of the box persistence of runtime state with JPA is possible with Drools & jBPM. You will need to configure a JPA entity manager (e.g. using hibernate) and have a JTA transaction manager (for development/testing purposes we recommend Bitronix as it's simple to setup and works embedded, but for production the use of JBoss Transactions is recommended).

      JPAKnowledgeService (jBPM distribution 5.4.0.Final API)

       

      Is anybody using any of the Bitronix stuff in production?

      Is there any way to configure to set up c3p0 to work like Bitronix?