void installRuntimeServices(final OperationContext context, final String name, final ModelNode model) throws OperationFailedException { boolean allowed = false; for (String ns : GLOBAL_NAMESPACES) { if (name.startsWith(ns)) { allowed = true; break; } } if (!allowed) { throw NamingLogger.ROOT_LOGGER.invalidNamespaceForBinding(name, Arrays.toString(GLOBAL_NAMESPACES)); } final BindingType type = BindingType.forName(NamingBindingResourceDefinition.BINDING_TYPE.resolveModelAttribute(context, model).asString()); if (type == BindingType.SIMPLE) { installSimpleBinding(context, name, model); } else if (type == BindingType.OBJECT_FACTORY) { installObjectFactory(context, name, model); } else if (type == BindingType.LOOKUP) { installLookup(context, name, model); } else if (type == BindingType.EXTERNAL_CONTEXT) { installExternalContext(context, name, model); } else { throw NamingLogger.ROOT_LOGGER.unknownBindingType(type.toString()); } }
void installRuntimeServices(final OperationContext context, final String name, final ModelNode model) throws OperationFailedException { boolean allowed = false; for (String ns : GLOBAL_NAMESPACES) { if (name.startsWith(ns)) { allowed = true; break; } } if (!allowed) { throw NamingLogger.ROOT_LOGGER.invalidNamespaceForBinding(name, Arrays.toString(GLOBAL_NAMESPACES)); } final BindingType type = BindingType.forName(NamingBindingResourceDefinition.BINDING_TYPE.resolveModelAttribute(context, model).asString()); if (type == BindingType.SIMPLE) { installSimpleBinding(context, name, model); } else if (type == BindingType.OBJECT_FACTORY) { installObjectFactory(context, name, model); } else if (type == BindingType.LOOKUP) { installLookup(context, name, model); } else if (type == BindingType.EXTERNAL_CONTEXT) { installExternalContext(context, name, model); } else { throw NamingLogger.ROOT_LOGGER.unknownBindingType(type.toString()); } }
void installRuntimeServices(final OperationContext context, final String name, final ModelNode model) throws OperationFailedException { boolean allowed = false; for (String ns : GLOBAL_NAMESPACES) { if (name.startsWith(ns)) { allowed = true; break; } } if (!allowed) { throw NamingLogger.ROOT_LOGGER.invalidNamespaceForBinding(name, Arrays.toString(GLOBAL_NAMESPACES)); } final BindingType type = BindingType.forName(NamingBindingResourceDefinition.BINDING_TYPE.resolveModelAttribute(context, model).asString()); if (type == BindingType.SIMPLE) { installSimpleBinding(context, name, model); } else if (type == BindingType.OBJECT_FACTORY) { installObjectFactory(context, name, model); } else if (type == BindingType.LOOKUP) { installLookup(context, name, model); } else if (type == BindingType.EXTERNAL_CONTEXT) { installExternalContext(context, name, model); } else { throw NamingLogger.ROOT_LOGGER.unknownBindingType(type.toString()); } }