1 Reply Latest reply on Jun 22, 2012 10:00 AM by wdfink

    JBoss AS 6.1 Final how to configure durable @Asynchronous

    a.kushunin

      Hi community!

       

      I've following question:

      Is it possible  configure durability for method calls annotated with @Asynchronous?

      E.g. I need following behaviour: if I made call from stateless EJB A to method from stateless EJB B annotated as @Asynchronous and at this moment server suddenly stops, after restart I need to restart proceeding execution of  asynchronous method from bean B.

       

      I googled, but did managed to find exact description for implementation details for @Asynchronous annotation in Jboss AS 6.1 Final. But it seems that it's implemented using timers, if it's so, can we configure durable timers?

       

       

      P.S. I know, that such behaviour can be implemented using durable JMS and MDB, but do we have another mechanism, or can we configure AS to achive such results.

        • 1. Re: JBoss AS 6.1 Final how to configure durable @Asynchronous
          wdfink

          Hi Aliaksei,

           

          If you annotate a method call as @Asynchronous it will be handled as a 'normal' synchronous call, the only difference is that is is started directly and provide a Future object.

          In case of a server crash the method will fail and will not be recovered after restart.

          If you need such behaviour you might wait for the Future result and retry if you have an Exception.

           

          Wolf