This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes c3p0 configuration need help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "c3p0 configuration need help!" Watch "c3p0 configuration need help!" New topic
Author

c3p0 configuration need help!

Fedry Kemilau
Ranch Hand

Joined: Aug 06, 2007
Posts: 44
Hello all,

I have a doubt in setting the c3p0 configuration. I'm using hibernate framework for the ORM and MySQL for the database server. The variable wait_timeout is set to default which is 28800.

After implementing the connection pool, I managed to fix the problem, but not perfectly. Sometimes, socket exception is still thrown by tomcat, so user should refresh the page again to get the actual result.

So, I hope someone can help me with a better configuration for the c3p0.

Here is a cut of my configuration file:



Thank you,
Fedry


Solve this code:<br /> <br />10010101100001111011011000010100000111001011011111100011110101111100110100001
Emanuel Kadziela
Ranch Hand

Joined: Mar 24, 2005
Posts: 186
Socket exceptions rarely have anything to do with your connection pool configuration. If you were running out of connections or were taking too slow to get more connections or your startup was slow, or ... then maybe the pool configuration would be to blame, but socket exceptions usually mean your database is actually not physically reachable (as in the cable got disconnected) or something of that sort. It may also have nothing to do with the database.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: c3p0 configuration need help!
 
Similar Threads
c3p0 configuration
How do I use hbm2ddl correctly?
speed up the init time of hibernate
A ResourcePool could not acquire a resource from its primary factory or source.
Hibernate, MySQL and the EOFException