This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Pooled DataSource recovery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Pooled DataSource recovery " Watch "Pooled DataSource recovery " New topic

Pooled DataSource recovery

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I'm moving some code from a proprietary connection pool to a pooled DataSource in WebSphere 5.x. The authors of the existing pool put a lot of work into error recovery. One strategy is that when a SQL exception indicates communication errors they purge the pool and let it restart from scratch, which neatly recovers from a brief network burp.

I'm having trouble finding Sun doc on what to expect from a DataSource in such a situation. There's no API to purge the pool, so I'm hoping it has some signficant smarts built in. Any pointers to doc on this?

We'll be on UDB and I hope we'll be able to use Automatic Client Reroute. I believe that was a sufficient solution on another system in the company. It's not clear if I can use ACR with a single db instance, not in an HADR cluster. Anybody know for sure?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Ok, I'm told my old team uses ACR on databases without HADR. Whew.

Still don't know what IBM or Sun promises for DataSources reconnecting after transient network burp or a major stop & restart of the database.
I agree. Here's the link:
subject: Pooled DataSource recovery
Similar Threads
regarding connection pool
Tomcat Web app Timeout Issue
URGENT: Help Correctly Using ConnectionPoolDataSource in Servlet!
running out of ManagedConnections available
Better approach to get DB Connection