views:

200

answers:

1

I am facing a weird problem and it seems to be c3p0 related. I am starting two instances of an app in the same java vm which interact with each other. After some operations "APPARENT DEADLOCK" messages appear in the log.

I have the feeling that both app instances use the same connection pool although they use different session factory instances.

Might there be some "singleton-magic" involved in C3P0 ?

A: 

As far as I know, there are no singletons involved. Each datasource instance is configured / instantiated / managed separately.

Furthermore, using the same data source from several session factories should not cause any problems (assuming appropriate configuration, adequate number of connections, etc... but that's beside the point here).

Have you tried increasing the number of helper threads and setting maxAdministrativeTaskTime to a non-zero value as described here?

ChssPly76