0 Replies Latest reply on Sep 18, 2014 10:34 PM by laocui

    JMX Remoting with JBoss 7/EAP 6.3

    laocui

      Hi All,

       

      I'm migrating application from jboss 5.1 to Jboss eap 6.3.

      There are  two applications. one is ear,deployed in jboss eap, another is java standard application(Camel).

      The camel application has an exposed jmx service:  service:jmx:rmi:///jndi/rmi://172.20.30.85:19999/jmxrmi/camel

      Within jboss as 5, I used the following code to connect to camel in a stateless bean.

       

      JMXServiceURL target = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + host + ":" + port.toString() + "/jmxrmi/camel");

      JMXConnector connector = JMXConnectorFactory.connect(target);

       

      now, It couldn't work with jboss7 / eap 6.3.

      Caused by: javax.naming.NameNotFoundException: rmi://172.20.30.85:19999/jmxrmi/camel -- service jboss.naming.context.java.rmi:."172.20.30.85:19999".jmxrmi.camel

        at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:103)

        at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)

        at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:241)

        at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)

        at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)

        at javax.naming.InitialContext.lookup(InitialContext.java:411)

        at javax.naming.InitialContext.lookup(InitialContext.java:411)

        at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1929)

        at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1896)

        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:286)

        ... 92 more

       

       

      I know the remoting-naming replaced jboss-as-naming from jboss7, And try this,

      JMXServiceURL target = new JMXServiceURL("service:jmx:remoting-jmx://172.20.30.85:19999/jmxrmi/camel");

      it still doesn't work, got the following error:

       

      11:33:39,241 INFO  [org.xnio] (http-/127.0.0.1:8080-29) XNIO Version 3.0.9.GA-redhat-1

      11:33:39,252 INFO  [org.xnio.nio] (http-/127.0.0.1:8080-29) XNIO NIO Implementation Version 3.0.9.GA-redhat-1

      11:33:39,288 INFO  [org.jboss.remoting] (http-/127.0.0.1:8080-29) JBoss Remoting version (unknown)

      11:33:44,412 ERROR [org.jboss.remoting.remote.connection] (Remoting "endpoint" read-1) JBREM000200: Remote connection failed: java.io.IOException: JBREM000202: Abrupt close on Remoting connection 79f4a60c to sha-lri-pc-161/172.20.30.85:19999

      11:33:44,415 WARN  [com.lombardrisk.reform.process.api.ProcessInspectorBean] (http-/127.0.0.1:8080-29) Could not connect to integration MBean server: java.lang.RuntimeException: Operation failed with status WAITING

        at org.jboss.remotingjmx.RemotingConnector.internalRemotingConnect(RemotingConnector.java:235)

        at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:148)

        at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:99)

        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)

        at com.lombardrisk.reform.process.api.ProcessInspectorBean.getIntegrationMBeanServerConnection(ProcessInspectorBean.java:328)

        at com.lombardrisk.reform.process.api.ProcessInspectorBean.getRoutes(ProcessInspectorBean.java:486)

       

      Is there anyone who can guide me, thanks in advance.

       

      Regards

      Lowry