-->
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.  [ 3 posts ] 
Author Message
 Post subject: DBCP vs C3P0
PostPosted: Tue Apr 19, 2005 11:35 am 
Regular
Regular

Joined: Tue Nov 23, 2004 7:42 am
Posts: 82
Location: London, England
Does anyone have any recommendations over which connection pool is 'better'? We've been using c3p0 but it seems to repeatedly spawn asynchronous threads to test the connection to the database. I've experimented with dbcp and have noticed the memory usage of our web app increase over time but I'm unable to pin down why this is happening. It also seems to me that dbcp want to use more memory than c3p0.

Any comments?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 19, 2005 12:42 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Quote:
spawn asynchronous threads to test the connection to the database


you can change your parameters....

i don't know if dbcp always have bugs but we recommend c3p0 or proxool

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 12:31 pm 
C3P0 Developer
C3P0 Developer

Joined: Tue Jan 06, 2004 8:58 pm
Posts: 145
Hi.

Connection tests are usually performed asynchronously by c3p0, but Threads to do so are not spawned continually. Checking of idle Connections is performed by the thread of a java.util.Timer; checking of Connections on check-in are performed by c3p0's pool of helper Threads (three big by default, but configurable); checking of Connections on checkout or when an Exception occurs is synchronous in the client thread.

If you are seeing threads creation by c3p0 beyond a small fixed number (typically between 3 and 6), that means something unusual is going on. One-off threads are only spawned by c3p0 when all pools in its thread pool are apparently blocked or deadlock, a situation which would be verbosely indicated in your logs.

smiles,
Steve (c3p0 guy)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.