Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Communications link failure during commit().

 
bis ani
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

For my web application, I am using hibernate and mysql database and Jboss server. I configure the database connection in the hibernate.cfg file.

My server has to run continously for days and the user should be able to access the application whenever required. The problem I am facing is everyday morning, when I first Access the application , I am getting the following exception:

java.sql.SQLException: Communications link failure during commit(). Transaction resolution unknown.



I think the reason is after a period of inactivity , MYSQL Server is closing the connection. But I dont know where/how to set the maximum connect interval, through hibernate.

Please give some ideas regading this.

regards,
Bis
 
bis ani
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anybody help with the above question? Everyday morning I have to restart the server for tackiling this? Any hints..

regards,
Bismi
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!