8 Replies Latest reply on Jun 2, 2009 10:55 AM by frankthetank

    EAR Deployment Dependencies

    noelo

      Hi,
      I know that with services you can have dependencies (using the tag) so that the service won't fully deploy until all its mbean dependencies are ready.

      Is is possible to make an EAR dependent on an mbean. For example if a lib in the EAR was dependent on a Jboss cache instance, can you specify this using a depends tag and if so in which file ?

      regards and thanks
      Noel

        • 1. Re: EAR Deployment Dependencies
          mlange

          jboss.j2ee:service=EARDeployment,url='yourear.ear'

          • 2. Re: EAR Deployment Dependencies
            mlange

            jboss.j2ee:service=EARDeployment,url='yourear.ear'

            But an ear is not a real service in JBoss sense so this might not work in all cases (we are using this way to make an ear depend on a cache loader and it works).

            • 3. Re: EAR Deployment Dependencies
              noelo

              Thanks MLange,
              Alas I think that makes the service depend on the EAR (I think) and its the other way around I need it i.e. make the EAR not fully deploy until the CacheInstance is up and running....

              e.g. Somewhere in the EAR

              <depends>
              jboss.cache:service=MyCacheInstance
              </depends>


              Any ideas ?

              regards
              Noel


              • 4. Re: EAR Deployment Dependencies
                jaikiran

                What component in the EAR is dependent on that service? Is some EJB dependent on that cache service?

                • 5. Re: EAR Deployment Dependencies
                  noelo

                  A war file contained in the EAR has a dependency on a jboss cache instance which it retrieves through JMX.

                  • 6. Re: EAR Deployment Dependencies
                    jaikiran

                    You can add the depends in your jboss-web.xml (in the WEB-INF) of your WAR file:

                    <jboss-web>
                    
                     <depends>blah.blah</depends>
                    
                    </jboss-web>



                    • 7. Re: EAR Deployment Dependencies
                      noelo

                      Hi jaikiran,
                      Thanks for that. I've just checked our deployment and the the dependent artifact is a jar within an EAR. Is there any way to make the EAR dependent on the mbean.

                      Thanks for all your help,
                      Noel

                      • 8. Re: EAR Deployment Dependencies
                        frankthetank

                        Not really up to date but it is still open.

                        You can also depend on the jar, or?

                        jboss.j2ee:module=your_jar.jar,service=EJB3
                        


                        Only thing I do not like about such dependencies is that you have to use the jar name. If the name changes our your MBean moves to a nicer gated jar you have to manually adopt.