Description of problem: Timeout second is fixed at 5 seconds as on line 209 below and not configurable when a client is trying to connect to the server first time. There is a constant "org.jboss.remoting-jmx.timeout" but it is not used here. https://github.com/jbossas/remoting-jmx/blob/1.1.0.Final/src/main/java/org/jboss/remotingjmx/RemotingConnector.java#L185 ~~~ 207 // open a connection 208 final IoFuture<Connection> futureConnection = endpoint.connect(convert(serviceUrl), getOptionMap(), handler); 209 IoFuture.Status result = futureConnection.await(5, TimeUnit.SECONDS); ~~~ Version-Release number of selected component (if applicable): remoting-jmx 1.1.0.Final
Sample JMX client can be found in https://access.redhat.com/site/solutions/125473 like this. ~~~ import javax.management.MBeanServerConnection; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; public class JMXExample { public static void main(String[] args) throws Exception { String host = "remote-host"; int port = 9999; // management-native port String urlString ="service:jmx:remoting-jmx://" + host + ":" + port; System.out.println("\n\n\t**** urlString: "+urlString);; JMXServiceURL serviceURL = new JMXServiceURL(urlString); JMXConnector jmxConnector = JMXConnectorFactory.connect(serviceURL, null); MBeanServerConnection connection = jmxConnector.getMBeanServerConnection(); //Invoke on the JBoss AS MBean server int count = connection.getMBeanCount(); System.out.println(count); jmxConnector.close(); } } ~~~ Where "JMXConnectorFactory.connect(serviceURL, null)" passing null, it should be a configuration map like "org.jboss.remoting-jmx.timeout":"1000".
*** This bug has been marked as a duplicate of bug 1113242 ***
Darran Lofthouse <darran.lofthouse> updated the status of jira REMJMX-77 to Resolved