-->
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 connection pool initialized once for each mapping resou
PostPosted: Wed Apr 11, 2007 2:15 am 
Newbie

Joined: Wed Apr 11, 2007 2:03 am
Posts: 5
Hi,

I have configured hibernate to use C3P0. Whenever I stopped my application, the postgresql server that I am using will log a lot of "unexpected EOF on client connection
". And I did some investigation ...... I turned on my C3P0 logging. And I found that when I call configuration.buildSessionFactory(), I will have 1 + (number of mapping resources I've got in my configuration file) connection pools created. If i have 3 mapping resources then 4 connection pools get created! Did I do anything wrong? I only got one hibernate configuration file.

Thanks


Top
 Profile  
 
 Post subject: re:C3P0 connection pool initialized once for each mapping re
PostPosted: Thu May 31, 2007 4:45 pm 
Newbie

Joined: Wed May 16, 2007 4:13 pm
Posts: 5
What does your hibernate configuration file look like? Especially the c3p0 properties? We are using hibernate 3 w/c3p0, but with Spring as our bean factory framework and the pooling seems to be working just fine. One thing I did read is that c3p0 (default setting) is to create 3 helper threads (I believe per connection), so you might see a surge in connections, then they die away.

Hope this helps!


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.