4 Replies Latest reply on Jan 17, 2012 3:32 AM by arakasi69

    Howto use @Asynchronous in JBoss 6.1 Final

    arakasi69

      Hello,

       

      we're developing a jee 6 application. Some of our stateless session beans has methods which are annotated with @Asynchronous.

       

      These methods are not executed when called from another stateless session bean. The beans are also annotated with TransactionType.Attribute=Mandantory.

       

      We've successfully tested this beans with Arquillian + JBoss 7.0.2. We got Arquillian + JBoss 6.1 not running.

      We're running the default configuration in JBoss 6.1

       

      Any idea why @Asynchronous is not running ? Is there anything to configure in JBoss 6.1 to get this working ? I have'nt found some documentation in this community, so IMHO @Asynchronous should be enough, it's JEE 6 :-)

       

      Kind regards, Thomas

        • 1. Re: Howto use @Asynchronous in JBoss 6.1 Final
          arakasi69

          The ejb 3.1 spec wrotes

           

          "Client transaction context does not propagate with an asynchronous method invocation. From the Bean

          Developer’s view, there is never a transaction context flowing in from the client. This means, for exam-

          ple, that the semantics of the REQUIRED transaction attribute on an asynchronous method are exactly

          the same as REQUIRES_NEW."

           

          So a mandatory transaction seems not be supported.

           

          The successful tests under Arquillian and AS 7.0.2 may be a bug in Arquillian or AS 7.0.2

           

          Kind regards, Thomas

          1 of 1 people found this helpful
          • 2. Re: Howto use @Asynchronous in JBoss 6.1 Final
            arakasi69
            • 3. Re: Howto use @Asynchronous in JBoss 6.1 Final
              jaikiran

              @Asynchronous support in AS 6.x was not fully completed. I would recommend that you use AS 7.1.x and report any issues that you encounter. AS7 has fully functional @Asynchronous feature.

              • 4. Re: Howto use @Asynchronous in JBoss 6.1 Final
                arakasi69

                Hello jaikiran,

                 

                thanks for your answer.

                 

                Unfortunately we can't simply change to AS 7.1, because our application uses a rich swing client, which uses the HTTPInvoker.

                So far i know the HTTPInvoker is not supported in AS 7.1

                 

                In this case, which workaround would you reommend ?

                 

                - Implementing a @Local Interface for the bean's wich uses @Asynchronous

                - Evaluating transaction requires new for asynchronous methods

                 

                Kind regards, Thomas