1 Reply Latest reply on Jul 20, 2007 4:00 PM by Andrew Rubinger

    EJBs depends on each other

    asaf sh Expert

      Hey,

      I have an 'MBeans waiting for other MBeans' error produced by Jboss without any other errors around,

      I started to remove EJBs and the error disappeared,
      I think found the part that makes the trouble, I have EJBs that depends on each other. so in each of the EJB, I inject the other one with the @EJB annotation,


      What should I do when each EJB depends on the other one?
      Is that not allowed? Glassfish and other appservers allow that without a problem, or there's another way to solve this problem?


      here's how complete error from server.log:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TaskBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AdapterBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=CommonUtilsBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemGroupBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemAttributeBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
       Depends On Me:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ImportsSeamBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=OrgBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ReconcileBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserSeamBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ConfBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TaskBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=CommonUtilsBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=CapabilityBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemGroupBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemAttributeBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ImportsSeamBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=OrgBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TaskBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=CommonUtilsBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
       Depends On Me:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=OrgSeamBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=OrgSeamBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=OrgBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ReconcileBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TaskBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=CommonUtilsBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=IdentityAttributeBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemGroupBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemAttributeBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
       Depends On Me:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ReconcileSeamBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ReconcileSeamBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TaskBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ReconcileBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=EventBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=IdentityAttributeBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
       Depends On Me:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestSeamBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserSeamBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestSeamBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TaskBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=CommonUtilsBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemGroupBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
       Depends On Me:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleSeamBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserSeamBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleSeamBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemGroupBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=EventBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=PasswordBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=IdentityAttributeBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemAttributeBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
       Depends On Me:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ConfBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=OrgBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=ReconcileBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestSeamBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleSeamBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserSeamBean,service=EJB3
      
      ObjectName: jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserSeamBean,service=EJB3
       State: NOTYETINSTALLED
       I Depend On:
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TaskBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RequestBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TaskMonitorSeamBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=RoleBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=PasswordBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=UserBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemAttributeBean,service=EJB3
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=TargetSystemBean,service=EJB3
       persistence.units:ear=velo.ear,jar=velo.jar,unitName=velo
       jboss.j2ee:ear=velo.ear,jar=velo.jar,name=AccountBean,service=EJB3
      
      
      16:36:50,421 INFO [Server] Runtime shutdown hook called, forceHalt: true
      




      NB - I'm using Jboss 4.2.0GA,


      Thanks