public static ObjectName tryRegister(@Nonnull final Object mbean, @Nonnull final String name)
    {
        try {
            final ObjectName objectName = new ObjectName(name);
            tryRegister(mbean, objectName);
            return objectName;
        } catch (Exception e) {
            Log.warn("Failed to register MBean with platform MBean server, using object name: {}", name, e);
            return null;
        }
    }
Registers a MBean in the platform MBean server, replacing any MBean that might have been registered earlier using
the same object name.

This method will log but otherwise ignore any exception that is thrown when registrating the bean.

@param mbean The bean to register
@param name The identifier to register the bean under.
@return the ObjectName instance used the register the bean.
xmppserver/src/main/java/org/jivesoftware/openfire/JMXManager.java