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

    Adding listeners to a remote MBean Server

    Conor O'Neill Newbie

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

      I've looked in the FAQ, and found this article:

      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);