I am not sure whether i am posting this in the correct forum. We are using SLSB(CMT) and Hibernate in our application. One of our SLSB interacts with the database for database operations. We are trying to find a way through which we can show the user a message whenever the Database is locked(may be for backup). Here's our scenario: - User through jsp does some operation, which results in the invocation of the SLSB - The SLSB(with CMT) then does a database operation - Consider a scenario in which the database is locked. In such a case the SLSB just waits(even after the transaction timeout). As a result the application just hangs.
The scenario occurs very rarely, but we would like to show a message to the user the database is currently locked. Is this possible? Any suggestions are welcome.
What does your server log say? Surely there must be a exception thrown by the EJB container when the transaction times out. When this happens, I would expect the container to mark the transaction for rollback and throw RemoteException or EJBException to the client. Does the client receive any exceptions?
There's only a WARN message printed in the server log after the transaction times out. The transaction manager won't throw exceptions while the SLSB is waiting for the blocked database operation to complete (unless the SLSB does subsequent operations that involve the transaction manager)
Joined: Sep 29, 2002
What EJB server are you using? It is not behaving in the way I would expect. When an EJB's transaction times out, I would expect the server to end (rollback) the transaction.