Hi all,
I'm using Hibernate along with C3P0. Here is my C3P0 properties:
<property name="acquireIncrement" value="5" /> <property name="minPoolSize" value="20" /> <property name="maxPoolSize" value="100" /> <property name="maxStatements" value="50" /> <property name="maxIdleTime" value="3600" /> <property name="maxIdleTimeExcessConnections" value="300"/> <property name="numHelperThreads" value="6" /> <property name="debugUnreturnedConnectionStackTraces" value="true" /> My question is: once I use opensSession() method, do I get one of the poosible opened connections from the pool and if there no available try to acquire new ones or always creates a new one?
I'm also using sometimes hibernateTemplate in some methods and what I see in Hibernate Statistics is that I have a leak of opened sessions although I always close them in the finally block afterwards they are opened.
Here is some info about Hibernate statistics after half an hour of being running the system:
Connection count: 23761 Trx count: 28149 Succ trx count: 4400 Opened sessions: 23787 Closed sessions: 23758 No. queries: 13442 Quey Max time: 12167
My problem is that the system after some time, specially after some heavy load peaks it halts and stops completely.
Thanks in advance.
|