This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stale Database Connections

 
Kash Mhai
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
I use WAS 5.X and use connection pooling for obtaining database connections. However i get "connection closed" exception, and i traced it back to the stale connections in the pool. How do i identify from java code or any other means that a connection has become stale and obtain a new connection?

Any help is appreciated,

Thanks
Kash
 
Serkan Demir
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a common solution for this pooling problem is to run a pinger thread to send keep alive query (e.g: select 1 from anytable)to all connections in the pool with a constant frequency. By the way, connections wouldn't be stale anymore.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic