I\'m trying to set request timeout for JMX Connector but seems like it doesn\'t work.
env.put(\"jmx.remote.x.request.waiting.timeout\", new Long(30000));
u can try these codes to set the JMX connector timeout:
JMXConnector connectWithTimeout(JMXServiceURL url, long timeout, TimeUnit unit) {
ExecutorService executor = Executors.newSingleThreadExecutor();
Future future = executor.submit(new Callable() {
public JMXConnector call() {
return JMXConnectorFactory.connect(url);
}
});
return future.get(timeout, unit);
}