-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: C3P0 openSession
PostPosted: Mon Oct 28, 2013 2:33 pm 
Newbie

Joined: Mon Oct 28, 2013 2:24 pm
Posts: 2
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.