2 Replies Latest reply on Jan 27, 2009 1:33 AM by jaikiran pai

    circular reference issue

    Andrei Markovits Newbie

      I updated my jboss from 4.0 to 4.2. I changed in code most of the ejb related annotation modifications and everitying is working except one thing. I get this error:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.j2ee:jar=abpejb.ejb3,name=AccountFacadeBean,service=EJB3
      State: NOTYETINSTALLED
      I Depend On:
      jboss.j2ee:jar=abpejb.ejb3,name=AccountFileFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=ChargeDAOBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=LiveTimeQueueFacadeBean,service=EJB3
      persistence.units:jar=abpejb.ejb3.jar,unitName=manager1
      jboss.j2ee:jar=abpejb.ejb3,name=InvoiceFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=PropertyFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=OperatorFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=LoggerBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=AccountGroupDAOBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=AccountDAOBean,service=EJB3
      Depends On Me:
      jboss.j2ee:jar=abpejb.ejb3,name=InvoiceFacadeBean,service=EJB3

      ObjectName: jboss.j2ee:jar=abpejb.ejb3,name=InvoiceFacadeBean,service=EJB3
      State: NOTYETINSTALLED
      I Depend On:
      jboss.j2ee:jar=abpejb.ejb3,name=MailSenderBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=AccountFileFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=AccountFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=FaxBatchFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=PaymentFacadeBean,service=EJB3
      persistence.units:jar=abpejb.ejb3.jar,unitName=manager1
      jboss.j2ee:jar=abpejb.ejb3,name=InvoiceDAOBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=ChargeFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=PrintJobFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=OperatorFacadeBean,service=EJB3
      jboss.j2ee:jar=abpejb.ejb3,name=LoggerBean,service=EJB3
      Depends On Me:
      jboss.j2ee:jar=abpejb.ejb3,name=AccountFacadeBean,service=EJB3


      From what i read the problem is that i'm using circular references to injected EJB's (using the the EJB annotation).
      In AccountFacadeBean i have:
      @EJB
      private InvoiceFacadeLocal invoiceFacade;

      and in InvoiceFacadeBean i have:
      @EJB
      private AccountFacadeLocal accountFacade;

      I read somewhere that i should also put a @IgnoreDependency annotation but i didn't find this annotation in any package.
      What should i do? Is there any way to fix it?

      Andrei