NamingContext.initializeNamingManager();
final ServiceTarget target = context.getServiceTarget();
// Create the java: namespace
newControllers.add(target.addService(ContextNames.JAVA_CONTEXT_SERVICE_NAME, new NamingStoreService())
.setInitialMode(ServiceController.Mode.ACTIVE)
.addListener(verificationHandler)
.install());
// Create the Naming Service
final NamingService namingService = new NamingService();
newControllers.add(target.addService(NamingService.SERVICE_NAME, namingService)
.addDependency(ContextNames.JAVA_CONTEXT_SERVICE_NAME, NamingStore.class, namingService.getNamingStore())
.setInitialMode(ServiceController.Mode.ACTIVE)
.addListener(verificationHandler)
.install());
// Create the java:global namespace
newControllers.add(target.addService(ContextNames.GLOBAL_CONTEXT_SERVICE_NAME, new NamingStoreService())
.setInitialMode(ServiceController.Mode.ACTIVE)
.addListener(verificationHandler)
.install());
// Create the java:jboss vendor namespace
newControllers.add(target.addService(ContextNames.JBOSS_CONTEXT_SERVICE_NAME, new NamingStoreService())
.setInitialMode(ServiceController.Mode.ACTIVE)
.addListener(verificationHandler)
.install());
// Setup remote naming store
//we always install the naming store, but we don't install the server unless it has been explicitly enabled
newControllers.add(target.addService(ContextNames.EXPORTED_CONTEXT_SERVICE_NAME, new NamingStoreService())
.setInitialMode(ServiceController.Mode.ACTIVE)
.addListener(verificationHandler)
.install());
// add the default namespace context selector service