List of usage examples for javax.management MalformedObjectNameException getCause
public synchronized Throwable getCause()
From source file:org.lsc.webai.services.LscRemoteCommands.java
private boolean jmxBind() { if (lscServer != null) { try {//from w w w .j ava 2 s. c o m return lscServer.ping(); } catch (UndeclaredThrowableException ce) { } } try { String sUrl = "service:jmx:rmi:///jndi/rmi://" + hostname + ":" + port + "/jmxrmi"; LOGGER.info("Connecting to remote engine on : " + sUrl); url = new JMXServiceURL(sUrl); jmxC = new RMIConnector(url, null); jmxC.connect(); jmxc = jmxC.getMBeanServerConnection(); ObjectName lscServerName = new ObjectName("org.lsc.jmx:type=LscServer"); lscServer = JMX.newMXBeanProxy(jmxc, lscServerName, LscServer.class, true); return true; } catch (MalformedObjectNameException e) { LOGGER.error(e.toString(), e); } catch (NullPointerException e) { LOGGER.error(e.toString(), e); } catch (MalformedURLException e) { LOGGER.error(e.toString(), e); } catch (IOException e) { if (!(e.getCause() instanceof ServiceUnavailableException)) { LOGGER.error(e.toString(), e); } } return false; }