LOG.debug("MBean already registered with ObjectName: {}", name);
}
}
// register bean if by force or not exists
ObjectInstance instance = null;
if (forceRegistration || !exists) {
LOG.trace("Registering MBean with ObjectName: {}", name);
instance = server.registerMBean(obj, name);
}
// need to use the name returned from the server as some JEE servers may modify the name
if (instance != null) {
ObjectName registeredName = instance.getObjectName();
LOG.debug("Registered MBean with ObjectName: {}", registeredName);
mbeansRegistered.put(name, registeredName);
}
}