Checking the validity of an Oracle Connection
Posted on 2004-09-06
I use Oracle JDBC Driver's OracleConnection class in one of my applications where I have implemented connection pooling.
Now I faced a problem once. It is as follows:
When I once shutdown the oracle server when my application was up, I was unbale to get data from the databse, which is correct.
But ideally, the connection pool should not be affected in such circumstances.
If I get a connection form the pool and this connection is no more valid, then the conenction should be reinitialized.
How I can do this?
How do I know(in my ocde) that the oracle server is restarted?