public ObjectName preRegister(MBeanServer mBeanServer, ObjectName objectName) throws Exception
{
this.mBeanServer = mBeanServer;
this.objectName = objectName;
// make sure our identity system property is properly set
Identity identity = Identity.get(this.mBeanServer);
// this is a slight hack, but we have to have some way to know the main
// JBoss MBeanServer data
System.setProperty("jboss.remoting.jmxid", identity.getJMXId());
System.setProperty("jboss.remoting.instanceid", identity.getInstanceId());
System.setProperty("jboss.remoting.domain", identity.getDomain());
return objectName;
}