log.debug("setupJ2EEMBeans(), create J2EEServer instance");
Package pkg = Package.getPackage("org.jboss");
String vendor = pkg.getSpecificationVendor();
String version = pkg.getImplementationVersion();
// Create the createService
J2EEDomain serverDomain = new J2EEDomain(serviceName.getDomain());
ObjectName domain = serverDomain.getObjectName();
server.registerMBean(serverDomain, domain);
// Create single Local J2EEServer MBean
J2EEServer j2eeServer = new J2EEServer("Local", domain, vendor, version);
ObjectName lServer = j2eeServer.getObjectName();
server.registerMBean(j2eeServer, lServer);