4 Replies Latest reply on Feb 20, 2013 2:51 AM by bmaxwell

    Problem with startup dependency between ears

    chrkoelle

      Hi

       

       

      I have a problem with the dependency between two ear deployments in JBoss 7.1.

       

       

      The first ear contains an ejb-jar with several session beans. The second ear contains a singleton bean which has to be initialized at startup. The initialization method now tries to access the remote ejbs in the first jar:

       

       

      @Startup

      @Singleton

      public class MySingleton {

       

        @PostConstruct

        public void start() {

          // Initialization code that accesses the remote ejbs

        }

         

      }

       

      Unfortunately this isn't working because i donÄt know how to guaratee that the first ear is completely deployed before the second ear starts the singleton bean. Is there any way to accomplish this?

       

       

      Thanks

      Christian