1 Reply Latest reply on Nov 28, 2010 1:08 PM by aslak

    How to test Service POJOs (JBoss extension of EJB3)

    silenius

      I have a stateless session bean that I am successfully testing with Arquillian and JBoss AS 6 Embedded. However if I upgrade my session bean to a JBoss Service, changing the @Stateless annotation into @Service(objectName = "my.package:service=MyService"), my test fails. Here's the definition of my Service POJO:

       

      @Service(objectName = "my.package:service=MyService")
      @Local(MyServiceLocal.class)
      @LocalBinding(jndiBinding = "myService")
      @Management(MyServiceManagement.class)
      public class MyService implements MyServiceLocal, MyServiceManagement {
          ...
      }
      

       

      And here's how I inject the service on my test class:

       

      @Depends("my.package:service=MyService")
      private MyServiceLocal myService;
      

       

      Any ideas what might be going on?

       

      Thanks,

      Samuel