Hi guys, I have a Java application which maintains a connection pool to Oracle database through Oracle thin driver. If somebody restart Oracle database, the connection pool is no longer valid. What can I do when somebody restart database?
Jun Hong<br />SCJP, SCJD, SCWCD, SCEA<br />IBM Certified Systems Expert(V4.0)
Which connection pool & application server are you using? I remember somebody talking about this a while back and they put some code in their connection pool to check the connections were valid before handing them out.
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Joined: Sep 05, 2001
Hi there, Thank you for your message. I am using the connection pool from oracle thin driver. Now I start to think that the connection pool which is maintained by datasource can take care of itself. If database restarts, connection pool refresh itself. (This means some code is check the pool constantly with some time intervals. Perhaps, the connection pool will be refreshed when an staled connection Exception is thrown) Several months ago, I was using WebSphere 4.0 and the connection pool is provided by WebSphere. Behind the sceen, it is just a Oracle thin driver connection pool. Since that one was fine in the weekends. My new pool should be fine. However, I am still not sure. My current application throw broken pipe SQLException on a Sunday. I am suspicious that people restarted Oracle server when that happens. Last weekend, it did not happen again. The stuff you mentioned is more related to the implementation of connection pool. How to check whether it is valid. I guess.
Joined: Oct 09, 2001
What classes do you use to implement the connection pool with the oracle thin client driver?
Did it happen this weekend? Adam
subject: Connection pool and restart database problem