-->
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: Which c3p0 version to use with hibernate 3?
PostPosted: Wed Sep 13, 2006 11:35 am 
Newbie

Joined: Wed Sep 13, 2006 6:12 am
Posts: 1
Hi,

I just migrated my project (tomcat/hib/c3p0/mysql) from hibernate 2 to hibernate 3.1.3.
Now I wonder which c3p0 version I should use considering primarily the stability of the application.

c3p0-0.9.0:
Comes with the hibernate 3.1.3 release (and even with the newest 3.2.CR4), which I would interpret as a form of recommendation. But for sure this c3p0 version has (at least minor) bugs which are fixed in later versions.

c3p0-0.9.0.4:
Contains bugfixes for the former 0.9.0.x versions. But this version still seem to have some critical problems, e.g.:


c3p0-0.9.1-pre7:
May contain bugfixes, e.g. for the problems above, but I'm not really thrilled to use a pre-release in a productional environment.

Any recommendations / experiences / opinions / thoughts?

Andreas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 14, 2006 3:31 pm 
C3P0 Developer
C3P0 Developer

Joined: Tue Jan 06, 2004 8:58 pm
Posts: 145
First, sorry for the dilemma... I wish you didn't feel you faced so many tradeoffs.

The issue that was of most practical significance in c3p0-0.9.0.4 (and which is only just resolved in c3p0-0.9.1-pre7) has to do with the interaction between Connection close() and the statement pool. If you don't use statement caching (hibernate.c3p0.max_statements=0), you're not likely to see this. If there's a clamour for it, I could backport the fix. The other issue you cite (pool size dropping below its minimum, eventually to zero, and not recovering) was very rarely reported (at least to me), and was resolved in the c3p0-0.9.1-pre series by a significant rewrite of pool size management, which would be a more disruptive backport. Both issues are embarrassing, but rare (and c3p0 recovers from the stmt-cache-related deadlock). c3p0-0.9.0.4 is not a bad choice, with statement caching disabled for maximum stability.

That said, c3p0-0.9.1-pre7 resolves these and many other issues, as well as adding new features. It's brand new, though. I've had too little feedback to affirm it's stability, although I think it will be. -pre6 has had a lot of use, and resolves the pool sizing issue, but not the stmt-cache deadlock.

One nice thing about c3p0 is that you really don't have to commit. (no pun intended...) I'd encourage you to try the latest, and I'll bet it works great for you. If not, please embarrass me with a detailed report of what went wrong, and take solace in that changing versions is nothing more than replacing a jar file.

Good luck!
Steve


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.