/** * Construct a new instance. * * @param componentName the component name * @param componentClassName the component instance class name * @param moduleDescription the EE module description * @param deploymentUnitServiceName the service name of the DU containing this component */ public ComponentDescription(final String componentName, final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName) { this.moduleDescription = moduleDescription; if (componentName == null) { throw EeLogger.ROOT_LOGGER.nullName("component"); } if (componentClassName == null) { throw EeLogger.ROOT_LOGGER.nullVar("componentClassName", "component", componentName); } if (moduleDescription == null) { throw EeLogger.ROOT_LOGGER.nullVar("moduleDescription", "component", componentName); } if (deploymentUnitServiceName == null) { throw EeLogger.ROOT_LOGGER.nullVar("deploymentUnitServiceName", "component", componentName); } serviceName = BasicComponent.serviceNameOf(deploymentUnitServiceName, componentName); this.componentName = componentName; this.componentClassName = componentClassName; configurators.addLast(DEFAULT_COMPONENT_CONFIGURATOR); configurators.addLast(DEFAULT_INTERCEPTOR_CONFIGURATOR); configurators.addLast(DEFAULT_COMPONENT_VIEW_CONFIGURATOR); }
private static ServiceName componentServiceName(final OperationContext context, final ModelNode operation) { final PathAddress address = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)); final String parent; final String module; int i = 2; if (address.getElement(1).getKey().equals(ModelDescriptionConstants.SUBDEPLOYMENT)) { parent = resolveRuntimeName(context,address.getElement(0)); module = address.getElement(1).getValue(); i++; } else { parent = null; module = resolveRuntimeName(context,address.getElement(0)); } final String component = address.getElement(i).getValue(); final ServiceName deploymentUnitServiceName; if (parent == null) { deploymentUnitServiceName = Services.deploymentUnitName(module); } else { deploymentUnitServiceName = Services.deploymentUnitName(parent, module); } // Hmm, don't like the START bit return BasicComponent.serviceNameOf(deploymentUnitServiceName, component).append("START"); }
/** * Construct a new instance. * * @param componentName the component name * @param componentClassName the component instance class name * @param moduleDescription the EE module description * @param deploymentUnitServiceName the service name of the DU containing this component */ public ComponentDescription(final String componentName, final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName) { this.moduleDescription = moduleDescription; if (componentName == null) { throw EeLogger.ROOT_LOGGER.nullName("component"); } if (componentClassName == null) { throw EeLogger.ROOT_LOGGER.nullVar("componentClassName", "component", componentName); } if (moduleDescription == null) { throw EeLogger.ROOT_LOGGER.nullVar("moduleDescription", "component", componentName); } if (deploymentUnitServiceName == null) { throw EeLogger.ROOT_LOGGER.nullVar("deploymentUnitServiceName", "component", componentName); } serviceName = BasicComponent.serviceNameOf(deploymentUnitServiceName, componentName); this.componentName = componentName; this.componentClassName = componentClassName; configurators.addLast(DEFAULT_COMPONENT_CONFIGURATOR); configurators.addLast(DEFAULT_INTERCEPTOR_CONFIGURATOR); configurators.addLast(DEFAULT_COMPONENT_VIEW_CONFIGURATOR); }
/** * Construct a new instance. * * @param componentName the component name * @param componentClassName the component instance class name * @param moduleDescription the EE module description * @param deploymentUnitServiceName the service name of the DU containing this component */ public ComponentDescription(final String componentName, final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName) { this.moduleDescription = moduleDescription; if (componentName == null) { throw EeLogger.ROOT_LOGGER.nullName("component"); } if (componentClassName == null) { throw EeLogger.ROOT_LOGGER.nullVar("componentClassName", "component", componentName); } if (moduleDescription == null) { throw EeLogger.ROOT_LOGGER.nullVar("moduleDescription", "component", componentName); } if (deploymentUnitServiceName == null) { throw EeLogger.ROOT_LOGGER.nullVar("deploymentUnitServiceName", "component", componentName); } serviceName = BasicComponent.serviceNameOf(deploymentUnitServiceName, componentName); this.componentName = componentName; this.componentClassName = componentClassName; configurators.addLast(DEFAULT_COMPONENT_CONFIGURATOR); configurators.addLast(DEFAULT_INTERCEPTOR_CONFIGURATOR); configurators.addLast(DEFAULT_COMPONENT_VIEW_CONFIGURATOR); }
/** * Construct a new instance. * * @param componentName the component name * @param componentClassName the component instance class name * @param moduleDescription the EE module description * @param deploymentUnitServiceName the service name of the DU containing this component */ public ComponentDescription(final String componentName, final String componentClassName, final EEModuleDescription moduleDescription, final ServiceName deploymentUnitServiceName) { this.moduleDescription = moduleDescription; if (componentName == null) { throw MESSAGES.nullVar("name"); } if (componentClassName == null) { throw MESSAGES.nullVar("componentClassName"); } if (moduleDescription == null) { throw MESSAGES.nullVar("moduleDescription"); } if (deploymentUnitServiceName == null) { throw MESSAGES.nullVar("deploymentUnitServiceName"); } serviceName = BasicComponent.serviceNameOf(deploymentUnitServiceName, componentName); this.componentName = componentName; this.componentClassName = componentClassName; configurators.addLast(FIRST_CONFIGURATOR); }
private static ServiceName componentServiceName(final ModelNode operation) { final PathAddress address = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)); final String parent; final String module; int i = 2; if (address.getElement(1).getKey().equals(ModelDescriptionConstants.SUBDEPLOYMENT)) { parent = address.getElement(0).getValue(); module = address.getElement(1).getValue(); i++; } else { parent = null; module = address.getElement(0).getValue(); } final String component = address.getElement(i).getValue(); final ServiceName deploymentUnitServiceName; if (parent == null) { deploymentUnitServiceName = Services.deploymentUnitName(module); } else { deploymentUnitServiceName = Services.deploymentUnitName(parent, module); } // Hmm, don't like the START bit return BasicComponent.serviceNameOf(deploymentUnitServiceName, component).append("START"); }