6 Replies Latest reply on Nov 19, 2002 9:35 PM by adrian.brock

    Using JBoss JMX  from a JDMK client

    gbullen

      I am trying to use the JBoss rim interface to access remote mBeans from a client that already has the JMK classes loaded (in this case from SUN's JDMK). when I do so, I get Java serialization errors all over the place.
      Sample code:

      Set s = server.queryNames( null, null );
      Iterator it = s.iterator();
      while( it.hasNext() ) {
      ObjectName name = (ObjectName)it.next(); // bye bye

      I looked at the JBoss JMX implementation of ObjectName and it is quite different from the standard JMX implementation - you even added an extra attribute.

      Why have you done this? Doesn't it effectively mean that it is now VERY hard to use the JBoss JMX in conjunction with any other JMX implementation?
      Any thoughts as to how I solve my little problem, without the pain of creating a separate class loader and doing lots of converstions....

      Thoughts and comments all welcome...
      Thanks,
      --Geoff

        • 1. Re: Using JBoss JMX  from a JDMK client
          gbullen

          Oops.. lets make that rmi not rim...
          Damn finger trouble :-)

          • 2. Re: Using JBoss JMX  from a JDMK client

            update to latest versions that implement jmx 1.1 serialization

            • 3. Re: Using JBoss JMX  from a JDMK client
              chaeron

              That kind of sucks actually.

              I've been working on a revised version of the JMX Console Web App....one that uses the JBoss RMI JMX interface (ie. using RemoteMBeanServer), instead of using the in-process MBeanServer instance, so that I can run the JMX Console in an external Tomcat container (ie. one running in a different JVM than JBoss...not embedded).

              And since Tomcat 4.1.12 and JBoss 3.0.4 use different versions of the javax.management.ObjectName class, the JMX Console servlet code picks up the Tomcat version and thus cannot talk to JBoss JMX properly due to the serialization mismatch.

              Which version of JBoss is using JMX 1.1 (or whatever is compatible with Tomcat 4.1.12)?

              Thanks!

              • 4. Re: Using JBoss JMX  from a JDMK client

                1.1 serialization compliance is included in the 3.2 branch, dropping MX 1.1.1 jar into 3.0.x will probably work too (though I haven't tried)

                • 5. Re: Using JBoss JMX  from a JDMK client
                  chaeron

                  Is there somewhere I can find the pre-built JMX 1.1.1 jars?

                  Or do I have to build 'em from source?

                  Thanks!

                  • 6. Re: Using JBoss JMX  from a JDMK client

                    Hi,

                    3.2beta2 will be out soon (this week?)
                    Copy jboss-jmx.jar from there.

                    Sorry, I would backport the jmx serialization to 3.0
                    but it would have stopped 3.0.4 "talking jmx" to previous
                    versions of 3.0

                    The real problem was the jmx 1.0 spec not including
                    a class serialization section.

                    Incidently, I think jdmk uses the same code as the RI.
                    There are some serious problems with their modelmbean
                    code if you enable "1.0" compatibilty, especially on
                    a 1.3 VM - "1.1" serialization is the default

                    If you intend to use QueryExp, it won't work.
                    This still isn't specified by the 1.1 spec. :-(

                    Regards,
                    Adrian