5 Replies Latest reply on Sep 16, 2008 9:27 AM by alesj

    Management questions

    jmesnil

      Hi,

      I'm currently writing the management code for JBoss Messaging and I want to be sure we integrate well with JBoss MC for our next release.

      Due to our requirements (e.g. being embeddable in another application), we do not use MC to manage our resources.
      Instead our managed resources (Queues, Topics, etc.) are created dynamically and registered in a MBeanServer.
      However, when we run in standalone (using JBoss MC), the MBeanServer we use is injected by the MC (currently, the platform MBeanServer is injected).

      I'd like to be sure we play nice with JBoss MC but I did not found in the documentation or the wiki some answers to my questions.
      - Which MBeanServer is used by the MC to register its annotated resources (the platform one or another)? Is it configurable?
      - How can I inject this MBeanServer to be also used as the MBeanServer for our own managed resources?

      Thanks for the help,
      jeff

        • 1. Re: Management questions
          alesj

           

          "jmesnil" wrote:

          - Which MBeanServer is used by the MC to register its annotated resources (the platform one or another)? Is it configurable?

          Dunno what exactly you mean?
          Where, when, ...
          Which annotated resources?
          Configurable how?

          I'll try to answer in AS5 notion.
          We use our own config of MBeanServer - see JMXKernel bean in jmx.xml.
          In order to use @JMX or our custom -service.xml,
          underlying MBeanServer needs to be JBoss impl,
          since we use some custom hooks / impl details.

          I learned that the hard way :-),
          when using this features outside AS,
          in my MC demos:
          - http://anonsvn.jboss.org/repos/jbossas/projects/demos/trunk/jmx/src/main/resources/META-INF/system-jmx-beans.xml

          But as you can see - see the rest of demo code -
          not a lot of code is required to use this.
          Hence I can say it's very configurable.

          "jmesnil" wrote:

          - How can I inject this MBeanServer to be also used as the MBeanServer for our own managed resources?

          I guess there is a 1M ways to do that. :-)
          Once JMXKernel bean is setup - mbean server is fully functional,
          you can do what ever you want with this bean.

          If you give me more exact question,
          I can then give you more exact answer. ;-)

          • 2. Re: Management questions
            jmesnil

             

            "alesj" wrote:

            Dunno what exactly you mean?
            Where, when, ...
            Which annotated resources?
            Configurable how?


            I sound confusing 'cause I'm confused :)

            "alesj wrote:

            But as you can see - see the rest of demo code -
            not a lot of code is required to use this.
            Hence I can say it's very configurable.


            That's what I needed to know: in AS5, I'll be able to use the JMXKernel's mbeanServer and inject it into JBoss Messaging.

            Thanks for the help Ales,
            jeff

            • 3. Re: Management questions
              alesj

               

              "jmesnil" wrote:

              That's what I needed to know: in AS5, I'll be able to use the JMXKernel's mbeanServer and inject it into JBoss Messaging.

              Perhaps a feature/work in JBM worth considering,
              should you strip/split down your components to small pieces,
              - here I target the one's you think of binding into MBeanServer -
              describe/annotate them properly and let MC handle them.

              Hence you free your code of JMX usage,
              which might not be present in future versions of JBossAS5/6. ;-)

              • 4. Re: Management questions
                jmesnil

                 

                "alesj" wrote:

                Hence you free your code of JMX usage,
                which might not be present in future versions of JBossAS5/6. ;-)


                I think this is a part of the confusion.
                In JBoss Messaging, we use JMX to let our user manage our resources (e.g. clear a queue, change an interval, etc.). I do not expect to get rid of JMX for this.
                For all things related to building and binding JBoss Messaging, we have JMX-Free POJOs and leverage the MC.

                I hope I'm less confusing now ;)
                jeff

                • 5. Re: Management questions
                  alesj

                   

                  "jmesnil" wrote:

                  In JBoss Messaging, we use JMX to let our user manage our resources (e.g. clear a queue, change an interval, etc.). I do not expect to get rid of JMX for this.

                  You could perhaps already leverage our Managed/MetaType project?
                  Or at least be ready to use it.

                  Check the project itself for more details.
                  And/or check JBoss5 profile service tests on the usage.