Hi Slava,
thanks very much for the reply. The SQLException is created by weblogic wrapped by ResourceException. There is no SQL error code associated and there are different messages for different scenarios (like shutting down of DB, listeners gone, administratively the pool disabled, so and so). There is no unique way of detecting the pool failure.
I am planning to detect the pool failure at the getConnection() method call of DataSource.
I added an interceptor to capture the getConnection() method call and detect the pool failure. It worked for direct datasource.getConnection(). When it is called using the Hibernate, it does stores local copy of Connection object in ConnectionManager. I read the source code and the news group
http://forum.springframework.org/showthread.php?t=19825
looks like there is an Hibernate bug which sets the aggresiveRelease mode to close on session close. Now i have to try to set the release mode to "auto" and try.
I will post my test result later if it works. Meanwhile if someone has better idea to handle this scenario, please share your thoughts.
Thanks,
CAbir