This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes How to Recreate Connection in the pool. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How to Recreate Connection in the pool." Watch "How to Recreate Connection in the pool." New topic

How to Recreate Connection in the pool.

Bennet Xavier
Ranch Hand

Joined: Jun 19, 2008
Posts: 162
Hi All,

If we have Connection Pooling and DB server is restarted or all the connection in DB server is killed.

How to recreate the connection in application connection pooling.

for Example: I have started the application with Connection pooling, if the connection are killed in DB server, how can i refresh the Connection pooling.

Thanks In Advance,
Bennet Xavier X
Sandeep Sanaboyina
Ranch Hand

Joined: Dec 14, 2009
Posts: 72
Depends on your connection pooling implementation.

For Example, in OracleConnectionCacheManager you have the refreshCache method.

Better check the javadocs for your connection pool class.

They say you have to be the first, the best or different. I say, is it too much to ask for all three.
Bennet Xavier
Ranch Hand

Joined: Jun 19, 2008
Posts: 162
Thank you very much.
camilo lopes
Ranch Hand

Joined: Aug 08, 2007
Posts: 202
i fixed this problem with pool connection, in this post i presented the solution pool
its in portuguese, but you can use google translate .

note: once i will create a blog in english.

Brazil - Sun Certified Java Programmer - SCJP 5 About Java - Update every Week.
Guide SCJP - tips that you need know
Caeser smith

Joined: May 10, 2011
Posts: 5
Bennet Xavier wrote:Thank you very much.

is the refreshCache() solved your problem? if so how did you implemented it, i am facing the same problem. can you help please
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: How to Recreate Connection in the pool.
jQuery in Action, 3rd edition