use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class MailDependenciesProcessor method deploy.
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit unit = phaseContext.getDeploymentUnit();
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpecification moduleSpec = unit.getAttachment(Attachments.MODULE_SPECIFICATION);
moduleSpec.addSystemDependency(new ModuleDependency(moduleLoader, MAIL_API, false, false, true, false));
moduleSpec.addSystemDependency(new ModuleDependency(moduleLoader, ACTIVATION_API, false, false, true, false));
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class SarModuleDependencyProcessor method deploy.
/**
* Add dependencies for modules required for manged bean deployments, if managed bean configurations are attached
* to the deployment.
*
* @param phaseContext the deployment unit context
* @throws DeploymentUnitProcessingException
*/
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
final JBossServiceXmlDescriptor serviceXmlDescriptor = deploymentUnit.getAttachment(JBossServiceXmlDescriptor.ATTACHMENT_KEY);
if (serviceXmlDescriptor == null) {
// Skip deployments with out a service xml descriptor
return;
}
moduleSpecification.addSystemDependency(new ModuleDependency(Module.getBootModuleLoader(), JBOSS_MODULES_ID, false, false, false, false));
moduleSpecification.addSystemDependency(new ModuleDependency(Module.getBootModuleLoader(), JBOSS_AS_SYSTEM_JMX_ID, true, false, false, false));
// depend on Properties editor module which uses ServiceLoader approach to load the appropriate org.jboss.common.beans.property.finder.PropertyEditorFinder
moduleSpecification.addSystemDependency(new ModuleDependency(Module.getBootModuleLoader(), PROPERTIES_EDITOR_MODULE_ID, false, false, true, false));
// All SARs require the ability to register MBeans.
moduleSpecification.addPermissionFactory(REGISTER_PERMISSION_FACTORY);
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class JPADependencyProcessor method addDependency.
private void addDependency(ModuleSpecification moduleSpecification, ModuleLoader moduleLoader, DeploymentUnit deploymentUnit, ModuleIdentifier... moduleIdentifiers) {
for (ModuleIdentifier moduleIdentifier : moduleIdentifiers) {
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleIdentifier, false, false, true, false));
ROOT_LOGGER.debugf("added %s dependency to %s", moduleIdentifier, deploymentUnit.getName());
}
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class EjbDependencyDeploymentUnitProcessor method deploy.
/**
* Adds Java EE module as a dependency to any deployment unit which is an EJB deployment
*
* @param phaseContext the deployment unit context
* @throws DeploymentUnitProcessingException
*
*/
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
// get hold of the deployment unit
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
//always add EE API
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, EJB_API, false, false, true, false));
// previously exported by EJB_API prior to WFLY-5922 TODO WFLY-5967 look into moving this to WS subsystem
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, JAX_RPC_API, false, false, true, false));
//we always give them the EJB client
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, EJB_CLIENT, false, false, true, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, EJB_NAMING_CLIENT, false, false, true, false));
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, EJB_IIOP_CLIENT, false, false, false, false));
//we always have to add this, as even non-ejb deployments may still lookup IIOP ejb's
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, EJB_SUBSYSTEM, false, false, true, false));
if (IIOPDeploymentMarker.isIIOPDeployment(deploymentUnit)) {
//needed for dynamic IIOP stubs
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, IIOP_OPENJDK, false, false, false, false));
}
//TODO: remove the app client bit after the next EJB release
if (!isEjbDeployment(deploymentUnit) && !DeploymentTypeMarker.isType(DeploymentType.APPLICATION_CLIENT, deploymentUnit)) {
// nothing to do
return;
}
//this must be the first dep listed in the module
if (Boolean.getBoolean("org.jboss.as.ejb3.EMBEDDED"))
moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.CLASSPATH, false, false, false, false));
}
use of org.jboss.as.server.deployment.module.ModuleDependency in project wildfly by wildfly.
the class WSDependenciesProcessor method deploy.
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit unit = phaseContext.getDeploymentUnit();
final ModuleLoader moduleLoader = Module.getBootModuleLoader();
final ModuleSpecification moduleSpec = unit.getAttachment(Attachments.MODULE_SPECIFICATION);
if (addJBossWSDependencies) {
moduleSpec.addSystemDependency(new ModuleDependency(moduleLoader, JBOSSWS_API, false, true, true, false));
moduleSpec.addSystemDependency(new ModuleDependency(moduleLoader, JBOSSWS_SPI, false, true, true, false));
}
for (ModuleIdentifier api : JAVAEE_APIS) {
moduleSpec.addSystemDependency(new ModuleDependency(moduleLoader, api, false, false, true, false));
}
}
Aggregations