4 Replies Latest reply on Aug 5, 2005 5:13 PM by fabcipriano

    LocalJBossServerDomain and SubDeployer.START_NOTIFICATION

    fabcipriano

      I´d like to know if there is a reason to LocalJBossServerDomain use SubDeployer.START_NOTIFICATION in handleNotification to create ManagedObjects.

      I´m asking this because if we replace the START_NOTIFICATION by CREATE_NOTIFICATION it is easier to implement the SMO in J2EEDeployedObject using the StateManagement class.

        • 1. Re: LocalJBossServerDomain and SubDeployer.START_NOTIFICATIO
          starksm64

          The reason is that jboss service create state does not have adequate guarentees as to what is initialized in the service for the interaction done by some of the factories as far as I remember. For some components it does not matter, but others have relationships that aren't known until start.

          • 2. Re: LocalJBossServerDomain and SubDeployer.START_NOTIFICATIO

             

            "scott.stark@jboss.org" wrote:
            The reason is that jboss service create state does not have adequate guarentees as to what is initialized in the service for the interaction done by some of the factories as far as I remember. For some components it does not matter, but others have relationships that aren't known until start.


            All that is guaranteed after create() is that the service has done any extra
            self initialization from its attributes (usually nothing).
            Things that involve referencing other services are not done until start()
            http://wiki.jboss.org/wiki/Wiki.jsp?page=ServiceLifecycle

            I've considered in the past removing the dependency create() from the ServiceController
            to see what breaks. :-)
            In principle, having one create() depend upon another is wrong since it shouldn't be
            referencing the other service at this point.


            • 3. Re: LocalJBossServerDomain and SubDeployer.START_NOTIFICATIO
              starksm64

              There also are no create/destroy management operations in jsr77. There are create/delete events, but these are simply notifications about the jsr77 management component itself.

              • 4. Re: LocalJBossServerDomain and SubDeployer.START_NOTIFICATIO
                fabcipriano

                The intention with this impossible change was to catch the ServiceMBean.STARTED event from (jboss.j2ee:service=EARDeployment,* or jboss.j2ee:service=EjbModule,* or etc) source service MBeans and launch a "j2ee.state.running" or etc jsr-77 events.

                The code would be like JNDIResource and JTAResource. Without change LocalJBossServerDomain, when a SubDeployer.START_NOTIFICATION is received we lost the ServiceMBean.STARTED from the source service MBean and this form SMO stay with a wrong state(StateManageable.UNREGISTERED).

                A possible solution is consult the state direct from the source MBean service and still keep listening for state changes.