} catch (Exception e) {
LOGGER.warn("Failed to start rmi registry: {}", e.getMessage());
LOGGER.debug("Failed to start rmi registry", e);
}
try {
connectorServerFactoryBean = new ConnectorServerFactoryBean();
// connectorServerFactoryBean.setDaemon(true);
connectorServerFactoryBean.setObjectName("connector:name=rmi");
// connectorServerFactoryBean.setThreaded(true);
connectorServerFactoryBean.setServer(getMBeanServer());
String serviceUrl = "service:jmx:rmi:///jndi/rmi://localhost:" + connectorPort + connectorPath;