3 Replies Latest reply on Feb 19, 2005 10:28 AM by Dimitris Andreadis

    hiding jmx lifecycle methods in html console

    Newbie

      Hello,

      Is it possible to have the lifecycle methods called (start() stop()) but not have them show up in the jmx console?

      This is possible with the MBeanRegistration functions. Is it possible with the org.jboss.system.Service too?

        • 1. Re: hiding jmx lifecycle methods in html console
          Dimitris Andreadis Master

          It's not possible to "hide" methods/attributes.

          What you probably want is to enforce security restrictions.

          How's the MBeanRegistration interface related to that???

          • 2. Re: hiding jmx lifecycle methods in html console
            Newbie

            If my object implements MBeanRegistration, the functions of that interface will get called automatically by the framework. But the functions are not visible in the jmx console. --> this is what I want.

            The only way I managed to get the lifecycle methods called is declaring them in the xxxMBean interface and hence they show up in the jmx console.

            • 3. Re: hiding jmx lifecycle methods in html console
              Dimitris Andreadis Master

              The methods on the MBeanRegistration interface are completely irrelevant to the interface exposed by an MBean.

              Again, it's a matter of applying security constraints to the invocation of an attribute (i.e. who's calling me?)

              But because this is a bit complicated, I reckon the best solution for you is to provide an MBean CTOR that will allow you more or less to initialise the MBean with whatever settings at the begging, and either don't expose those settings at all as attributes, or expose them as read only attributes.

              You can pass CTOR arguments when you deploy your service, see docs/dtd/jboss-service_4_0.dtd