Module depModule = loader.loadModule(dependency.getIdentifier()); ServiceLoader<ServletContainerInitializer> serviceLoader = depModule.loadService(ServletContainerInitializer.class); for (ServletContainerInitializer service : serviceLoader) { throw UndertowLogger.ROOT_LOGGER.errorLoadingSCIFromModule(dependency.getIdentifier().toString(), e);
BeanDeploymentModule other = bdmsByIdentifier.get(dependency.getIdentifier()); if (other != null && other != bdm) { bdm.addBeanDeploymentModule(other);
public void addSystemDependency(final ModuleDependency dependency) { if (!exclusions.contains(dependency.getIdentifier()) && !systemDependenciesSet.contains(dependency.getIdentifier())) { this.systemDependencies.add(dependency); this.systemDependenciesSet.add(dependency.getIdentifier()); } }
public void addSystemDependency(final ModuleDependency dependency) { if (!exclusions.contains(dependency.getIdentifier()) && !systemDependenciesSet.contains(dependency.getIdentifier())) { this.systemDependencies.add(dependency); this.systemDependenciesSet.add(dependency.getIdentifier()); } }
public void addSystemDependency(final ModuleDependency dependency) { if (!exclusions.contains(dependency.getIdentifier()) && !systemDependenciesSet.contains(dependency.getIdentifier())) { this.systemDependencies.add(dependency); this.systemDependenciesSet.add(dependency.getIdentifier()); } else { excludedDependencies.add(dependency.getIdentifier()); } }
public void addSystemDependency(final ModuleDependency dependency) { if (!exclusions.contains(dependency.getIdentifier()) && !systemDependenciesSet.contains(dependency.getIdentifier())) { this.systemDependencies.add(dependency); this.systemDependenciesSet.add(dependency.getIdentifier()); } }
public void addLocalDependency(final ModuleDependency dependency) { allDependencies = null; if (!exclusions.contains(dependency.getIdentifier())) { this.localDependencies.add(dependency); } }
public void addLocalDependency(final ModuleDependency dependency) { allDependencies = null; if (!exclusions.contains(dependency.getIdentifier())) { this.localDependencies.add(dependency); } else { excludedDependencies.add(dependency.getIdentifier()); } }
public void addLocalDependency(final ModuleDependency dependency) { allDependencies = null; if (!exclusions.contains(dependency.getIdentifier())) { this.localDependencies.add(dependency); } }
public void addLocalDependency(final ModuleDependency dependency) { allDependencies = null; if (!exclusions.contains(dependency.getIdentifier())) { this.localDependencies.add(dependency); } }
public void addExclusion(final ModuleIdentifier exclusion) { allDependencies = null; exclusions.add(exclusion); Iterator<ModuleDependency> it = systemDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } it = localDependencies.iterator(); while (it.hasNext()) { final ModuleDependency dep = it.next(); if (dep.getIdentifier().equals(exclusion)) { it.remove(); } } }
private static boolean hasCxfModuleDependency(DeploymentUnit unit) { final ModuleSpecification moduleSpec = unit.getAttachment(Attachments.MODULE_SPECIFICATION); for (ModuleDependency dep : moduleSpec.getUserDependencies()) { final String id = dep.getIdentifier().getName(); if (cxfExportingModules.contains(id)) { return true; } } return false; }
private static boolean hasCxfModuleDependency(DeploymentUnit unit) { final ModuleSpecification moduleSpec = unit.getAttachment(Attachments.MODULE_SPECIFICATION); for (ModuleDependency dep : moduleSpec.getUserDependencies()) { final String id = dep.getIdentifier().getName(); if (cxfExportingModules.contains(id)) { return true; } } return false; }
public static ServiceName install(final ServiceTarget target, final ModuleIdentifier identifier, final List<ModuleDependency> dependencies) { final ModuleLoadService service = new ModuleLoadService(dependencies); final ServiceName serviceName = ServiceModuleLoader.moduleServiceName(identifier); final ServiceBuilder<Module> builder = target.addService(serviceName, service); builder.addDependency(Services.JBOSS_SERVICE_MODULE_LOADER, ServiceModuleLoader.class, service.getServiceModuleLoader()); builder.addDependency(ServiceModuleLoader.moduleSpecServiceName(identifier), ModuleDefinition.class, service.getModuleDefinitionInjectedValue()); builder.addDependency(ServiceModuleLoader.moduleResolvedServiceName(identifier)); //don't attempt to load until all dependent module specs are up, even transitive ones for (ModuleDependency dependency : dependencies) { final ModuleIdentifier moduleIdentifier = dependency.getIdentifier(); if (moduleIdentifier.getName().startsWith(ServiceModuleLoader.MODULE_PREFIX)) { builder.addDependency(dependency.isOptional() ? OPTIONAL : REQUIRED, ServiceModuleLoader.moduleSpecServiceName(moduleIdentifier)); } } builder.setInitialMode(Mode.ON_DEMAND); builder.install(); return serviceName; }
public static ServiceName install(final ServiceTarget target, final ModuleIdentifier identifier, final List<ModuleDependency> dependencies) { final ModuleLoadService service = new ModuleLoadService(dependencies); final ServiceName serviceName = ServiceModuleLoader.moduleServiceName(identifier); final ServiceBuilder<Module> builder = target.addService(serviceName, service); builder.addDependency(Services.JBOSS_SERVICE_MODULE_LOADER, ServiceModuleLoader.class, service.getServiceModuleLoader()); builder.addDependency(ServiceModuleLoader.moduleSpecServiceName(identifier), ModuleSpec.class, service.getModuleSpec()); for (ModuleDependency dependency : dependencies) { final ModuleIdentifier moduleIdentifier = dependency.getIdentifier(); if (moduleIdentifier.getName().startsWith(ServiceModuleLoader.MODULE_PREFIX)) { builder.addDependency(dependency.isOptional() ? OPTIONAL : REQUIRED, ServiceModuleLoader.moduleSpecServiceName(moduleIdentifier)); } } builder.setInitialMode(Mode.ON_DEMAND); builder.install(); return serviceName; }
@SuppressWarnings({ "unchecked", "rawtypes" }) private void markDeploymentWithModuleDependency(ModuleIdentifier moduleIdentifier, AttachmentKey attachment, DeploymentUnit deployment) { ModuleSpecification moduleSpecification = deployment.getAttachment(Attachments.MODULE_SPECIFICATION); for (ModuleDependency deploymentDependency : moduleSpecification.getUserDependencies()) { if (deploymentDependency.getIdentifier().equals(moduleIdentifier)) { deployment.putAttachment(attachment, Boolean.TRUE); return; } } }
@Override public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpec = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE_SPECIFICATION); final Map<ModuleIdentifier, DeploymentUnit> deployments = new HashMap<ModuleIdentifier, DeploymentUnit>(); //local classes are always first deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, deploymentUnit); buildModuleMap(deploymentUnit, deployments); for (final ModuleDependency dependency : moduleSpec.getAllDependencies()) { final DeploymentUnit sub = deployments.get(dependency.getIdentifier()); if (sub != null) { deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, sub); } } }
@Override public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpec = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE_SPECIFICATION); final Map<ModuleIdentifier, DeploymentUnit> deployments = new HashMap<ModuleIdentifier, DeploymentUnit>(); //local classes are always first deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, deploymentUnit); buildModuleMap(deploymentUnit, deployments); for (final ModuleDependency dependency : moduleSpec.getAllDependencies()) { final DeploymentUnit sub = deployments.get(dependency.getIdentifier()); if (sub != null) { deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, sub); } } }
@Override public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpec = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE_SPECIFICATION); final Map<ModuleIdentifier, DeploymentUnit> deployments = new HashMap<ModuleIdentifier, DeploymentUnit>(); //local classes are always first deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, deploymentUnit); buildModuleMap(deploymentUnit, deployments); for (final ModuleDependency dependency : moduleSpec.getAllDependencies()) { final DeploymentUnit sub = deployments.get(dependency.getIdentifier()); if (sub != null) { deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, sub); } } }
@Override public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); final ModuleSpecification moduleSpec = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE_SPECIFICATION); final Map<ModuleIdentifier, DeploymentUnit> deployments = new HashMap<ModuleIdentifier, DeploymentUnit>(); //local classes are always first deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, deploymentUnit); buildModuleMap(deploymentUnit, deployments); for (final ModuleDependency dependency : moduleSpec.getAllDependencies()) { final DeploymentUnit sub = deployments.get(dependency.getIdentifier()); if (sub != null) { deploymentUnit.addToAttachmentList(Attachments.ACCESSIBLE_SUB_DEPLOYMENTS, sub); } } }