• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Problem with database timeout using Hibernate

 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic