Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with database timeout using Hibernate

 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a problem because my application is idle over the night. The users of it have only interests to use it over a day light.
So, when the time between two use (communication) with database is over a 8 hours, the exception is thrown, telling me that 'timeout' should be set longer ( I have not now exception trace, but I will in morning ).
However, I have 'googled', over the net and try many things to set up inside my web.xml *either for sesionFactory and for dataSource - I and using Spring's templates for Hibernate). I have also tried to setup a variable of mysql timeout to longer then 8 h, but it had no effect. Here is the my present database configuration of web.xml;



I would really appreciate if someone help, because I am getting to have some real problems (and 'itchy') because of this.
Thanks in advance!
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. Does anyone have an idea, what should I do to increase amount of time for timeout property?
I have changed my configuration file to this :



and, even I set "timeout" property to 0, which should mean no timeout, after about eight hours, I got this exception :



I would appreciate any help! Thanks!
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to inform anybody, who could have a similar problems, or the once related to connection pooling and database communication with it, to refer to this article, which I found very helpful connection pooling configuration.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic