1 Reply Latest reply on Jun 30, 2010 12:48 PM by jaikiran

    EJB spec violation or JBoss 6 bug?

    ljnelson

      Perhaps slightly off-topic, but I'm seeing an error in JBoss and want to  check with this community first to see if it's a spec violation instead.

       

      WITHOUT COMMENTING ON THE DESIGN, if it can be  avoided, since it's not mine and I don't yet understand why these  choices were made, and focusing solely on what the EJB specification  permits, is the following legal:

       

      XInterface
      XBean implements  XInterface (remote, as it happens; shouldn't matter)

       

      YInterface
      YBean  implements YInterface

       

      XBean has:
      @EJB
      private YInterface  y;

       

      YBean has:
      @EJB
      private XInterface x;

       

      This is not  strictly speaking circular, but JBoss blows up at  deployment time that suggests that  circularity is involved.  I am wondering if that is because this is a  specification violation, or because JBoss 6 M3 has a problem here.

       

      And now the stuff that I don't think matters:

       

      The beans are in their own jar files.

      The interfaces that the beans implement are in THEIR own jar files.

      Everything is in the lib directory of an ear.

       

      Thanks,
      Laird