1 Reply Latest reply on Sep 24, 2007 5:04 AM by Kabir Khan

    Next step in ServiceController Lifecycle

    Adrian Brock Master

      Related to this thread
      http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087219#4087219

      Where I'd really like to get to is that the JMX lifecycle is tied to the POJO
      lifecycle.

      Currently the ServiceController advice just does a start() straight away
      once the object is registered in jmx

       MBeanServer server = serviceController.getMBeanServer();
       server.registerMBean(mbean, objectName);
       try
       {
       serviceController.start(objectName);
       }
      


      But what I really want is the following for the POJO states:
      NOT_INSTALLED => MBean registered but with no management interface (Note 1)
      INSTANTIATED => MBean gets real management interface
      CREATE => serviceController.create(ObjectName)
      START => serverController.start(ObjectName)
      etc.

      The Note 1 is because there should a simple management interface
      where users can choose to start "on-demand" POJOs.

      But I'm not sure what this would look like with the new lifecycle stuff.
      What would the aop config look like for the different callbacks at different pojo events?

        • 1. Re: Next step in ServiceController Lifecycle
          Kabir Khan Master

          More or less the same

           <aop:lifecycle-configure xmlns:aop="urn:jboss:aop-beans:1.0"
           name="JMXAdvice"
           class="org.jboss.system.microcontainer.jmx.ServiceControllerLifecycleCallback"
           classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX"
           manager-bean="AspectManager"
           manager-property="aspectManager">
           <property name="serviceController"><inject bean="JMXKernel" property="serviceController"/></property>
           </aop:lifecycle-configure>
          
          

          Substitute lifecycle-configure for
          *lifecycle-create
          *lifecycle-describe
          *lifecycle-install
          *lifecycle-instantiate
          *lifecycle-preinstall
          *lifecycle-start