// lets force the MBeanServer to be created if needed
if (started.compareAndSet(false, true)) {
getMBeanServer();
if (createConnector) {
try {
rmiRegistryFactoryBean = new RmiRegistryFactoryBean();
rmiRegistryFactoryBean.setPort(connectorPort);
rmiRegistryFactoryBean.afterPropertiesSet();
} catch (Exception e) {
LOGGER.warn("Failed to start rmi registry: {}", e.getMessage());
LOGGER.debug("Failed to start rmi registry", e);