-->
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: Which conn pool? c3p0 crashes, puilt-in documented unstable
PostPosted: Fri Jun 19, 2009 9:13 am 
Newbie

Joined: Fri Jun 19, 2009 8:40 am
Posts: 1
I found this output when using Hibernate:

328 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)

I searched Google, but only found this:
http://docs.jboss.org/hibernate/stable/ ... ejdbc.html

It says:
"You should use a third party pool for best performance and stability."

I don't care about performance (I would guess the max load of my server is about 10 requests pr minute, and none of the requests execute more than a few simple SQL queries), but I do care about stability. But WHAT are the stability issues with the built-in pool? I cannot find such documentation. Please help.

To avoid database corruption, i have set connection.isolation to 8 in Hibernate. (=java.sql.Connection.TRANSACTION_SERIALIZABLE). To avoid deadlocks, I use a java.util.concurrent.locks.ReentrantLock around each Hibernate session to do mutual exclusion. I also use a connection pool size of max 1.

I have tried using c3p0 instead of built-in, but that one crashes (= throws an SQLException) for me at GooGooStatementCache line 552 when I interrupt the thread:

http://c3p0.sourcearchive.com/documenta ... ource.html

I do want to interrupt the thread, but if the interrupt happens in the middle of a database transaction, I want this transaction to complete and then handle the interrupt myself later in the thread.

I have not experienced this kind of crash with the built-in connection pool, but the documentation of Hibernate says that it is not stable. What should I do?

I have also considered proxool, but I gave up figuring out how to configure it.

Which connection pool would you recommend for me?


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.