1 Reply Latest reply on Dec 12, 2003 8:58 AM by Andrew Boyd

    Can Only Hot deploy <depends> problem.

    Andrew Boyd Novice

      Hi all,
      I'm only able to Hot deploy my sar because my XMBean depends on SystemProperties but my XMBean is instanciated before SystemProperties is registered.
      <mbean code="com.digitalreasoning.kafe.host.Host"

      <!-- An mbean for hot deployment/undeployment of LocalAgents.

      <depends optional-attribute-name="Deployer">drs.kafe:type=Service,service=LocalAgentLoader


      When I hot deploy I get the following:

      ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: drs.kafe:type=Host,name=Host
      state: CONFIGURED
      I Depend On: jboss:type=Service,name=SystemProperties

      Depends On Me: ]

      But if I look in the jmx-console I do see the name=SystemProperties,type=Service link under the jboss domain. And service=LocalAgentLoader,type=Service under
      drs.kafe domain along with Host. Seems like they are
      deployed even though I get the checkIncompleteDeployments exception.

      One other interesting thing is after I hot deploy the web-console is unavailable where the jmx-console is not. ???

      Any ideas?


        • 1. Re: Can Only Hot deploy <depends> problem.
          Andrew Boyd Novice

          Poking around the source code can help sometimes :-)
          It took me a while after reading this javaDoc from the
          ServiceControler for the meaning to sink in:

           * Deploy the beans
           * Deploy means "instantiate and configure" so the MBean is created in the MBeanServer
           * You must call "create" and "start" separately on the MBean to affect the service lifecycle
           * deploy doesn't bother with service lifecycle only MBean instanciation/registration/configuration
           public synchronized List install(Element config, ObjectName loaderName)

          Your Service/MBean will instantiated before any of the ServiceMBean lifecycle methods are called. So if you depend on another MBean
          you better not dependon that MBean in your constructor because
          it will be called before any atempt at satisifying your depends tag.

          Hope this helps someone in the future,