File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c3p0 configuration need help!

 
Fedry Kemilau
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Emanuel Kadziela
Ranch Hand
Posts: 187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic