• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate: Oracle connection timeout

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folk,

Afer 8 hours of inactivity (ex. during night) connection close and my application stop to work...

Anyone know how to obtain the same as "jdbc:mysql:/localhost/mydb?autoReconnect=true" with oracle jdbc driver? Assuming actually, even with MySql, using the autoReconnect parameter is not recommended (http://www.theserverside.com/news/thread.tss?thread_id=24137#111947).

I don't use Hibernate connection pool but DBCP (with tomcat) and this not help:
"<property name="connection.autoReconnect">true</property>": after 8 hours of inactivity I get "connection error" exception.

Can c3p0 help?
<property name="c3p0.idle_test_period">100</property>
Is c3p0 really "enterprise ready"?

Here my hibernate.cfg.xml file:



I use a JNDI resource with this "context.xml" configuration:



but it doesn't seem to work!
From Tomcat LOG:




I'm discouraged but I cannot think that a so basic thing is too difficult to setup! (
[ February 15, 2008: Message edited by: xerix bit ]
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have a look at this, especially the validationQuery, testOnBorrow, testWhileIdle, timeBetweenEvictionRunsMillis and the related properties.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic