3 Replies Latest reply on May 31, 2013 9:14 PM by sfcoy

    Jboss as 7 subsystem startup dependency

    jkrmelj

      Hello,

       

      I have a question regarding jboss as 7 subsystem startup sequence.

       

      It seems that subsystems are started in parallel, more or less at the same time within multiple threads. Is there a way to configure a subsystem to be dependent from another subsystem in a way that child subsystem is started after parent finishes it's startup?

       

      Or is there a way to limit number of startup threads to one?

       

      Thanks. Jernej

        • 1. Re: Jboss as 7 subsystem startup dependency
          sfcoy

          jkrmelj wrote:

           

          ...

          Is there a way to configure a subsystem to be dependent from another subsystem in a way that child subsystem is started after parent finishes it's startup?

          ...

           

          In general Subsystem dependencies are hard wired into each individual subsystem's code. ie. each susbsytem is made aware of it's dependencies at compile time.

           

          Why do you ask?

          • 2. Re: Jboss as 7 subsystem startup dependency
            jkrmelj

            I use speciall subsystem that is "dependent" of jboss web subsystem and there are problems when this subsystem is started prior to jboss web.

             

            I tryed to resolve this problem by moving jboss web subsystem definition prior to definition of "dependant" subsystem in standalone.xml. This helps, but not always, not at every startup.

             

            I thought there is some "dependency" configuration parameter of subsystem available to tell the server to start one subsystem after another.

             

            I found this post https://community.jboss.org/message/776404#776404 dealing with similar problem, which gives the same sollution to the problem as you - defining dependency at compile time.

            But if there is another option, I would rather avoid changing the source code.

             

            Thanks.

            • 3. Re: Jboss as 7 subsystem startup dependency
              sfcoy

              Presumably your subsystem is implemented in a JBoss module, with a module.xml file.

               

              You can add dependency elements to your module.xml file:

              {code:xml}<module ...>

                   <resources>

                        ...

                   </resources>

               

                   <dependencies>

                        <module name="org.jboss.as.web" />

                   </dependencies>

              </module>{code}

               

              (which I probably should have thought of earlier)