How to clear TransactionException from Spring Context
I am developing a web application using Struts1.2.7, Spring2.5 and IBatis. I am managing transactions using declarative transaction management approach.
My requirement is : If the database is unable to connect at the time of deployment, an error page has to be displayed showing Application is not deployed successfully due to communication failure.
If the database is up and be connected at the deployment and is disconnected in the middle of the user session, an error page has to be displayed saying database connection is lost.
We have a ServiceFacade which contains all the service methods and transaction management is applied on this ServiceFacade. So when i call a method on ServiceFacade, when database is not connected i am getting some TransactionException (which is base Exception class for all Transaction related exceptions). I am catching that exception and showing the error page saying DB is disconnected.
But after that if i call a method on ServiceFacade, i am getting some error saying Transaction could not be rolledback etc etc.....
Can anyone suggest me how to clear the transaction exception in the Spring context??
K. Siva Prasad Reddy