1 Reply Latest reply on Oct 10, 2003 5:36 AM by Adrian Brock

    calling mbean method from *-service.xml

    alan shields Newbie

      Is it possible to call an mbean method from a *-service.xml mbean deployment descriptor

      Specifically I would like to be able to call addUser in the jboss.mq.StateManager mbean

      Thanks

        • 1. Re: calling mbean method from *-service.xml
          Adrian Brock Master

          Write an MBean that does it at start[service]()

          // Potential management interface
          interface AddUserMBean
          extends ServiceMBean
          {
          ObjectName getStateManager()
          void setStateManager(ObjectName value);
          String getUser();
          void setUser(String value);
          String getRoles();
          void setRoles(String value);
          }

          // deployment descriptor
          <mbean ...>
          <depends optional-attrribute-name="StateManager">jboss.mq:service=StateManager
          whatver
          etc.

          Regards,
          Adrian