2 Replies Latest reply on Oct 18, 2003 9:59 AM by uramisten

    catching Transaction timeout....

    uramisten Newbie

      Is there any way to catch a transaction timeout in an EJB? We just get the error in the log, and can't figure out how to trap it so the Client can be told that the database operation has failed. Any ideas/hints?

        • 1. Re: catching Transaction timeout....
          Adrian Brock Master

          The client should receive one of the rollback exceptions depending
          upon whether it is a local or remote interface.


          • 2. Re: catching Transaction timeout....
            uramisten Newbie

            We are using hibernate with JBoss 3.2.1 /Tomcat.. .and for some reason, no-one seems to be able to catch the error, almost as if it is happening somewhere else.
            I have tried to catch the tx errors as well as JDBC errors and HibernateException and javax.resource.ResourceException, all of which are mentioned in the error thrown. Unfortunately nothing has worked. This could be a hibernate specific problem, but I though, just maybe someone here could also help.

            The timeout usually occurs after a session.flush() from hibernate when it is actually running the DB inserts/updates etc....

            (yes, I know we can increase the timout, but we'd rather they use smaller files, than wait 2 hours or so.. :-) )