c3p0 connection pool queries

前端 未结 1 669
醉酒成梦
醉酒成梦 2021-01-16 19:26

I am using c3p0 connection pool and I have minPoolSize=1 maxPoolSize=5 and InitialPoolSize=5.

When server starts, i can see it is having 5 connection. But as the fir

相关标签:
1条回答
  • 2021-01-16 19:37

    it sounds like you have two active pools. are you calling getConnection( user, password ) rather than the default getConnection()? c3p0 creates a distinct pool for each authentication. also, you can follow the number of active authentications via JMX.

    initialPoolSize shouldn't have anything much to do with it. also, it's always a good idea, when trying to understand c3p0 issues, to make sure that the active config is what you expect it is. again, you can see most config parameters via JMX, or more simply, check your log files. c3p0 DataSources dump their configuration at INFO upon initialization.

    0 讨论(0)
提交回复
热议问题