2 Replies Latest reply on Aug 14, 2007 5:44 AM by adrian.brock

    Rip out JBoss JMX implementation?

    bill.burke

      Is there any reason we still have our own JMX implementation in JBoss 5? Why don't we use the JDK's?

      For Embedded JBoss I tried to use the JDK's kernel, but unforunately, our implementation registers things in JMX's private namespace, so you required to use our JMX implementation.

      At a minimum, can I massage our JMX Kernel bridge so that it can run w/o our JMX implementation?

        • 1. Re: Rip out JBoss JMX implementation?

          The reasons are - in order of current importance (rather than the original importance)

          1) ClassLoading/UnifiedClassloader - should be gone soon with the new classloader

          2) Thread ContextClassLoader is not set by other JMX implementations during
          invocations on the MBean.

          3) JMX Interceptors/XMBean - although this should work in any JMX, Scott broke it a while ago - the XMBean is now tied to the MBeanRegistry for some bizarre reason?

          4) Ability to get the real object for any MBean - i.e. from the JBossMX MBeanRegistry
          mostly used in Injection. It is still used in the CMP2 container IIRC.

          5) Performance - Sun's RI is still slow - but it got better when they improved the
          performance of reflection in JDK1.4

          6) Bugs - The RI used to be very buggy, it's got better,
          but this is something that has recently come back to haunt us with not being able to
          change/fix javax.management.* classes in JDK5+

          7) Some parts of JBossAS use JBossMX specific details, like the classloading api
          and the MBeanRegistry.

          In practice, if (3) was fixed then we could move (2) into an XMBean interceptor
          (where it belongs), and we'd probably still get some of the improved performance.

          We already lost some performance switching to Sun's JDK5 javax.management.*
          classes, notice the difference booting JBoss4.0 on JDK1.4 vs JDK5? :-)

          I don't know how you solve (4) generically using the spec JMX api.

          • 2. Re: Rip out JBoss JMX implementation?

             

            "adrian@jboss.org" wrote:

            3) JMX Interceptors/XMBean - although this should work in any JMX, Scott broke it a while ago - the XMBean is now tied to the MBeanRegistry for some bizarre reason?

            ...

            In practice, if (3) was fixed then we could move (2) into an XMBean interceptor
            (where it belongs)


            It's on my TODO list for JBoss5 to complete of the @JMX annotations and advices
            currently prototyped in aop-mc-int (I've been waiting for the
            proposed annotations that will be defined in Java7 by JMX2.0 -
            these were proposed recently on that spec committe)
            This is would replace most of our use cases for XMBean.

            Since it will be aop based (i.e. you can configure what advices implement the
            annotations), we can also decorate/instrument the POJOs
            for JSR77 and other useful management features at the same time.

            http://jira.jboss.com/jira/browse/JBMICROCONT-71