1 Reply Latest reply on Mar 2, 2004 4:17 PM by David Wade

    sar and jar file dependencies

    Chandra Gottipati Newbie

      I am deploying a .sar file that has my MBean and a .jar file that has my EJBs. The MBean in the .sar file calls the start method on a java class that looks up the home interface of an EJB. Since the .jar file is getting deployed after the .sar file, I keep seeing the exception that the EJB home is not found. Is there a way to define a dependency in the jboss-service.xml file (which is part of the .sar file) to not look for the home interface till the .jar file is deployed?

        • 1. Re: sar and jar file dependencies
          David Wade Newbie

          Yes. I guess you have both the SAR and EJB inside the same EAR file. The MBean in the SAR willl be started before the EAR deployment is complete. Until the EAR deployment is complete, the EJB will not be found in the JNDI tree.

          One way around this, crusty but works, is to change your mbean to have an internal thread. Have this thread started from the mbean start method. At the start of the thread run method have loop that polls once every second for the EJB name appearing in the JNDI.