1 Reply Latest reply on May 23, 2008 11:56 AM by Thomas Skjølberg

    How to catch transaction time out exception?

    Avihai Marchiano Novice

      I work with Jboss4.2.
      I have a java client which communicates with the server via stateless bean (facade).

      Those stateless beans operate the business layer...

      I have a case that i get a transaction time out (the operation was 5 minutes) , I didn’t get any exception about it .

      I want to get an exception when timeout occurred catch it and throw my exception to the client.

      Please advice.

      Thank you

        • 1. Re: How to catch transaction time out exception?
          Thomas Skjølberg Newbie

          Hi,

          I have not tried this looking for timeouts, but try controlling the transactions manually using first

          @TransactionManagement(TransactionManagementType.BEAN)


          and
          @Resource
          UserTransaction utx;
          

          in the following way:
          utx.begin();
          ...
          utx.commit();
          

          with exception handling.

          However it is not clear from your mail if you actually need a transaction that last for 5+ minutes, or if it just is a long-lasting call that happends to be inside a transaction?

          Thomas