0 Replies Latest reply on Jan 5, 2012 3:12 PM by ceylanh

    Cross Dependent EJB Applications Deployment

    ceylanh

      Hello,

       

      I have a case where we have a set of EJBs packaged in a number of different EAR deployments for the sake of modularitiy and scalability.

       

      The EJBs from each EAR, has dependency to other EJBs contained in other EARs and back.

       

      When I try to inject EJBs from external context into an EJB with @EJB(lookup="...") annotation, during the deployment, deployer complains about the referenced EJBs not being available.

       

      Now,

       

      - Is this expected behaviour? Beacuse in my case the dependent EJBs may come up in time and I would kind of hope the deployer to report the resources (other EJBs) as unavailable, yet continue with the deployment.

       

      - Is there a way to tell to perform the deployment a-la late binding?

       

      My immediate workaround to that problem was to lookup EJBs in a @PostConstruct method. Is this the best practice?

       

      Regards,

      Hasan Ceylan