Hi all,
I'm currently using Hibernate with C3P0.
I'd like to configure correctly c3p0, and i'm facing the following problem :
In a one hibernate session per user context, i've noticed that the number of busyConnection never drecreased during hibernate session lifetime. The number of busyConnection only decreased when I use the close() method on the hibernate session. I thought that DB sessions are not busy while no query is not executed with the hibernate session.
For example, with 10 users on the app, I have to declare 10 max connections in C3P0 conf. It's really unefficient since the 10 users doesn't used their db session at the same time!
Does anyone can explain me how busy connection are working, and what to do to reduce number of busy connection? One solution may be the used one session per query context... But this significate a lot of jib on my side...
Thanks in advance,
Sebastien
|