system-jmx/src/main/java/org/jboss/system/ServiceMBeanSupport.java
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception {
        this.server = server;

        serviceName = getObjectName(server, name);

        return serviceName;
    }
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception {
        this.server = server;

        serviceName = getObjectName(server, name);

        return serviceName;
    }
Callback method of {@link javax.management.MBeanRegistration} before the MBean is registered at the JMX Agent.

<p>
<b>Attention</b>: Always call this method when you overwrite it in a subclass because it saves the Object Name of the
MBean.

@param server Reference to the JMX Agent this MBean is registered on
@param name Name specified by the creator of the MBean. Note that you can overwrite it when the given ObjectName is null
otherwise the change is discarded (maybe a bug in JMX-RI).
@return the ObjectName
@throws Exception for any error