3 Replies Latest reply on Oct 7, 2009 8:39 AM by jidehem

    EJB3 mutual-referring injection

    jidehem

      I have two Session beans which depends on each other, but could not manage to make it deploy, since injection seemed to fail.

      Is EJB3 mutual-referring injection allowed ?

      For example, is the following fragment of code allowed ?

      @Local
      interface A {
      }
      
      @Stateless
      class BeanA{
       @EJB B b;
      ...
      }
      
      @Local
      interface B {
      }
      
      @Stateless
      class BeanB{
       @EJB A a;
      ...
      }
      


      Note: I use JBoss 5.1.0GA