log.info("Activating Naming Subsystem");
NamingContext.initializeNamingManager();
final NamingStore namingStore = new InMemoryNamingStore(new NamingEventCoordinator());
// Create the Naming Service
final ServiceTarget target = context.getServiceTarget();
newControllers.add(target.addService(NamingService.SERVICE_NAME, new NamingService(namingStore))
.addAliases(ContextNames.JAVA_CONTEXT_SERVICE_NAME)
.setInitialMode(ServiceController.Mode.ACTIVE)
.addListener(verificationHandler)
.install());
// Create the java:global namespace
final NamingStore globalNamingStore = new InMemoryNamingStore();
newControllers.add(target.addService(ContextNames.GLOBAL_CONTEXT_SERVICE_NAME, new NamingStoreService(globalNamingStore))
.setInitialMode(ServiceController.Mode.ACTIVE)
.addListener(verificationHandler)
.install());
// Create the java:jboss vendor namespace
final NamingStore jbossNamingStore = new InMemoryNamingStore();
newControllers.add(target.addService(ContextNames.JBOSS_CONTEXT_SERVICE_NAME, new NamingStoreService(jbossNamingStore))
.setInitialMode(ServiceController.Mode.ACTIVE)
.addListener(verificationHandler)
.install());