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).