-->
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.  [ 2 posts ] 
Author Message
 Post subject: c3p0 threads are showing TIMED_WAITING all the time
PostPosted: Fri Mar 23, 2012 7:55 am 
Newbie

Joined: Fri Mar 23, 2012 7:09 am
Posts: 1
MySql Connections are getting closed when we check it through Mysql but the connection opened are not getting reused and c3p0 is creating new connections all the time. If any one has idea that what thing I am missing with the configuration. Please suggest

When we check the threads state in java then it says all the thread created by c3p0 are TIMED_WAITING.


Top
 Profile  
 
 Post subject: Re: c3p0 threads are showing TIMED_WAITING all the time
PostPosted: Thu Mar 29, 2012 1:59 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
I guess, that when the connection are not getting reused , it depends exclusively on how you use hibernate, not on how you configured c3p0 settings.
If you use stateful contexts (transaction scopes), then a connection is only put back to pool for re-usage when you call session.close (entityManager.close with JPA approach). Do you call session close at all ?

N.B.: I used c3p0 for more than a year in our production environment and never had such behaviour you describe.


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

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.