1 Reply Latest reply on Dec 12, 2003 9:40 AM by juha

    Depends tag needs clarification.

    andrewboyd

      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.

      I think this needs to be pointed out in the Docs. It took me three days
      before I figured this out. Hope this helps others.

      Andrew