3 Replies Latest reply on Jun 28, 2005 10:57 AM by jwillemin

    Dependency on Tomcat Startup

    andybass

      I have an mbean that needs to be dependent upon Tomcat starting up and being accesable - i.e. the Coyote connector has started as well.

      My mbean contains the the statement:
      jboss.web:type=Service,serviceName=jboss.web

      but that doesn't seem to work. I'm already using a numeric deployment sequence to ensure this is the last mbean deployed, but I still need Tomcat to be running.

      Any ideas?

      Thanks,
      Andy

        • 1. Re: Dependency on Tomcat Startup
          dimitris

          There is an elegant solution for this in 4.0.2

          http://wiki.jboss.org/wiki/Wiki.jsp?page=FAQJBossJMX

          "How can I delay the starting of my MBean until after the Tomcat connectors are active?"

          • 2. Re: Dependency on Tomcat Startup

             

            "dimitris@jboss.org" wrote:
            There is an elegant solution for this in 4.0.2

            http://wiki.jboss.org/wiki/Wiki.jsp?page=FAQJBossJMX

            "How can I delay the starting of my MBean until after the Tomcat connectors are active?"


            http://wiki.jboss.org/wiki/Wiki.jsp?page=MyDependencyDoesntWork
            Question

            I have added a dependency but it does not affect the startup ordering? e.g.

            <depends>jboss.management.local:J2EEApplication=tdi.ear,J2EEServer=Local,j2eeType=WebModule,name=tdi.war</depends>

            Answer

            That is because that MBean is not a service, NOTE: there is no service=, but more generally it is not created through an MBean deployment or via the service controller.

            In this case, it is an MBean that provides the JSR77 facade over the real service.

            You should look for the real mbean service that it represents, in the example above since it is a war deployment it will be in jboss.web.deployment.

            So - based on that - shouldn't the following work?
            jboss.web:service=WebServer

            It's definitely got "service=". But I have not had luck getting it working.

            http://wiki.jboss.org/wiki/Wiki.jsp?page=BarrierController

            This is nice, but for those of us who can't upgrade JBoss willy-nilly (for instance, if getting software approved for use on a particular client site is an involved process), is there another way? We are using 4.0.1 and I would like a more elegant solution than renaming my .sar to start with a Z :)

            Thanks,
            John

            • 3. Re: Dependency on Tomcat Startup

              That should be jboss.web:service=WebServer