6 Replies Latest reply on Sep 30, 2012 12:15 PM by m1ckey

    jboss-as-arquillian-container-manager 7.1.1.Final not working with @Asynchronous

    m1ckey

      Hi, I am in the process of upgrading to JBoss AS 7.1.1.Final. It all works unless I add @Asynchronous to a production code bean called in the test. Without @Asynchronous it works.

       

      With JBoss  AS 7.0.2.Final the test worked fine with or without the annotation. To be fair, I was only using web profile then.

      When I deploy the app manually outside Arquillian it works.

       

      What is really bizarre is that the error I'm getting has nothing to do with @Asynchronous, it cannot find a class that is definitely in the JAR. The class it cannot find is in a JAR that is not in the standard Maven repo and there is a warning about it when test executes.

       

      Any ideas? Thanks!

       

      Here's the bean:

       

      @Stateless
      @Asynchronous
      @Local(LibraryImporter.class)
      public class CacheAwareLibraryImporter implements LibraryImporter {
      
          @EJB
          private LibraryParser libraryParser;
          @EJB
          private LibraryService libraryService;
          @EJB
          private CacheableSongService cacheableSongService;
          @EJB
          private ApplicationConversation applicationConversation;
      
          @Override
          @TransactionAttribute(TransactionAttributeType.REQUIRED)
          public void importLibrary(File libraryFile) {
              Library library = libraryService.createLibrary();
              applicationConversation.startConversation(library);
      
              cacheableSongService.initialise(library);
              libraryParser.process(libraryFile, library);
              cacheableSongService.finalise(library);
      
              applicationConversation.endConversation(library);
          }
      }
      

       

      Here's my dependencies:

       

      
      <!-- TESTING -->
      
      
      <junit.version>4.8.2</junit.version>
      
      
      <mockito.version>1.8.5</mockito.version>
      
      
      <jboss-as-arquillian-container-manager.version>7.1.1.Final</jboss-as-arquillian-container-manager.version>
      
      
      <shrinkwrap.version>1.1.0-alpha-4</shrinkwrap.version>
      
      
      
      
      <!-- UTILS -->
      
      
      <vtd.version>2.10</vtd.version>
      
      
      <commons-lang.version>2.6</commons-lang.version>
      
      
      <joda-time.version>1.6.2</joda-time.version>
      
      
      
      
      <!-- CDI -->
      
      
      <weld-core.version>1.1.9.Final</weld-core.version>
      
      
      <weld-spi.version>1.1.Final</weld-spi.version>
      
      
      <arquillian.version>1.0.2.Final</arquillian.version>
      
      
      <arquillian-weld-ee-embedded-1.1.version>1.0.0.CR3</arquillian-weld-ee-embedded-1.1.version>