public void execute(final JndiViewExtensionContext context) throws OperationFailedException { final ModelNode applicationsNode = context.getResult().get("applications"); final ServiceRegistry serviceRegistry = context.getOperationContext().getServiceRegistry(false); final Set<Resource.ResourceEntry> deploymentResource = context.getOperationContext().readResourceFromRoot(PathAddress.EMPTY_ADDRESS, false).getChildren(DEPLOYMENT); for (final Resource.ResourceEntry entry : deploymentResource) { final ServiceController<?> deploymentUnitServiceController = serviceRegistry.getService(ServiceName.JBOSS.append("deployment", "unit", entry.getName())); final NamingStore appStore = NamingStore.class.cast(appContextController.getValue()); try { context.addEntries(deploymentNode.get("java:app"), new NamingContext(appStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:app", appName)));
final NamingStore moduleStore = NamingStore.class.cast(moduleContextController.getValue()); try { context.addEntries(moduleNode.get("java:module"), new NamingContext(moduleStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:module", appName, moduleName))); final NamingStore compStore = NamingStore.class.cast(compContextController.getValue()); try { context.addEntries(componentNode.get("java:comp"), new NamingContext(compStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:comp", appName, moduleName, componentName)));
final NamingStore moduleStore = NamingStore.class.cast(moduleContextController.getValue()); try { context.addEntries(moduleNode.get("java:module"), new NamingContext(moduleStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(MESSAGES.failedToRead("java:module", appName, moduleName))); final NamingStore compStore = NamingStore.class.cast(compContextController.getValue()); try { context.addEntries(componentNode.get("java:comp"), new NamingContext(compStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(MESSAGES.failedToRead("java:comp", appName, moduleName, componentName)));
public void execute(final JndiViewExtensionContext context) throws OperationFailedException { final ModelNode applicationsNode = context.getResult().get("applications"); final ServiceRegistry serviceRegistry = context.getOperationContext().getServiceRegistry(false); final Set<Resource.ResourceEntry> deploymentResource = context.getOperationContext().readResourceFromRoot(PathAddress.EMPTY_ADDRESS, false).getChildren(DEPLOYMENT); for (final Resource.ResourceEntry entry : deploymentResource) { final ServiceController<?> deploymentUnitServiceController = serviceRegistry.getService(ServiceName.JBOSS.append("deployment", "unit", entry.getName())); final NamingStore appStore = NamingStore.class.cast(appContextController.getValue()); try { context.addEntries(deploymentNode.get("java:app"), new NamingContext(appStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:app", appName)));
final NamingStore moduleStore = NamingStore.class.cast(moduleContextController.getValue()); try { context.addEntries(moduleNode.get("java:module"), new NamingContext(moduleStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:module", appName, moduleName))); final NamingStore compStore = NamingStore.class.cast(compContextController.getValue()); try { context.addEntries(componentNode.get("java:comp"), new NamingContext(compStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:comp", appName, moduleName, componentName)));
public void execute(final JndiViewExtensionContext context) throws OperationFailedException { final ModelNode applicationsNode = context.getResult().get("applications"); final ServiceRegistry serviceRegistry = context.getOperationContext().getServiceRegistry(false); final Set<Resource.ResourceEntry> deploymentResource = context.getOperationContext().getRootResource().getChildren(DEPLOYMENT); for (final Resource.ResourceEntry entry : deploymentResource) { final ServiceController<?> deploymentUnitServiceController = serviceRegistry.getService(ServiceName.JBOSS.append("deployment", "unit", entry.getName())); final NamingStore appStore = NamingStore.class.cast(appContextController.getValue()); try { context.addEntries(deploymentNode.get("java:app"), new NamingContext(appStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(MESSAGES.failedToRead("java:app", appName)));
final NamingStore moduleStore = NamingStore.class.cast(moduleContextController.getValue()); try { context.addEntries(moduleNode.get("java:module"), new NamingContext(moduleStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:module", appName, moduleName))); final NamingStore compStore = NamingStore.class.cast(compContextController.getValue()); try { context.addEntries(componentNode.get("java:comp"), new NamingContext(compStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:comp", appName, moduleName, componentName)));
public void execute(final JndiViewExtensionContext context) throws OperationFailedException { final ModelNode applicationsNode = context.getResult().get("applications"); final ServiceRegistry serviceRegistry = context.getOperationContext().getServiceRegistry(false); final Set<Resource.ResourceEntry> deploymentResource = context.getOperationContext().readResourceFromRoot(PathAddress.EMPTY_ADDRESS, false).getChildren(DEPLOYMENT); for (final Resource.ResourceEntry entry : deploymentResource) { final ServiceController<?> deploymentUnitServiceController = serviceRegistry.getService(ServiceName.JBOSS.append("deployment", "unit", entry.getName())); final NamingStore appStore = NamingStore.class.cast(appContextController.getValue()); try { context.addEntries(deploymentNode.get("java:app"), new NamingContext(appStore, null)); } catch (NamingException e) { throw new OperationFailedException(e, new ModelNode().set(EeLogger.ROOT_LOGGER.failedToRead("java:app", appName)));