1 Reply Latest reply on Nov 24, 2006 4:35 AM by dimitris

    Adding listeners to a remote MBean Server

    conoroneill

      I am trying to register a listener on a remote instance of JBoss.

      I've looked in the FAQ, and found this article:
      http://wiki.jboss.org/wiki/Wiki.jsp?page=HowDoIAddANotificationListenerToARemoteMBeanServer

      Is there really nothing simpler than this?

      I don't want to do all this stuff which uses JBoss-specific classes; I have to develop software which will run across many different app servers.

      I'm currently using JBoss version 4.0.2, but would be ready to upgrade to 4.0.5.

      What I'd _like_ to write is something like this, but I can't find any details about how to assemble a correct URL:

      JMXServiceURL url = new JMXServiceURL("service:jmx:[SOMETHING]");
      JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
      MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
      mbsc.addNotificationListener(otherMBeanName, listener, null, null);