ee/src/main/java/org/jboss/as/ee/managedbean/processors/JavaEEDependencyProcessor.java
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);

        final ModuleLoader moduleLoader = Module.getBootModuleLoader();

        //add jboss-invocation classes needed by the proxies
        ModuleDependency invocation = new ModuleDependency(moduleLoader, JBOSS_INVOCATION_ID, false, false, false, false);
        invocation.addImportFilter(PathFilters.is("org/jboss/invocation/proxy/classloading"), true);
        invocation.addImportFilter(PathFilters.acceptAll(), false);
        moduleSpecification.addSystemDependency(invocation);

        ModuleDependency ee = new ModuleDependency(moduleLoader, JBOSS_AS_EE, false, false, false, false);
        ee.addImportFilter(PathFilters.is("org/jboss/as/ee/component/serialization"), true);
        ee.addImportFilter(PathFilters.is("org/jboss/as/ee/concurrent"), true);
        ee.addImportFilter(PathFilters.is("org/jboss/as/ee/concurrent/handle"), true);
        ee.addImportFilter(PathFilters.acceptAll(), false);
        moduleSpecification.addSystemDependency(ee);

        // add dep for naming permission
        moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create(WILDFLY_NAMING), false, false, false, false));

        //we always add all Java EE API modules, as the platform spec requires them to always be available
        //we do not just add the javaee.api module, as this breaks excludes

        for (final ModuleIdentifier moduleIdentifier : JAVA_EE_API_MODULES) {
            moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleIdentifier, true, false, true, false));
        }
    }
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        final ModuleSpecification moduleSpecification = deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);

        final ModuleLoader moduleLoader = Module.getBootModuleLoader();

        //add jboss-invocation classes needed by the proxies
        ModuleDependency invocation = new ModuleDependency(moduleLoader, JBOSS_INVOCATION_ID, false, false, false, false);
        invocation.addImportFilter(PathFilters.is("org/jboss/invocation/proxy/classloading"), true);
        invocation.addImportFilter(PathFilters.acceptAll(), false);
        moduleSpecification.addSystemDependency(invocation);

        ModuleDependency ee = new ModuleDependency(moduleLoader, JBOSS_AS_EE, false, false, false, false);
        ee.addImportFilter(PathFilters.is("org/jboss/as/ee/component/serialization"), true);
        ee.addImportFilter(PathFilters.is("org/jboss/as/ee/concurrent"), true);
        ee.addImportFilter(PathFilters.is("org/jboss/as/ee/concurrent/handle"), true);
        ee.addImportFilter(PathFilters.acceptAll(), false);
        moduleSpecification.addSystemDependency(ee);

        // add dep for naming permission
        moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, ModuleIdentifier.create(WILDFLY_NAMING), false, false, false, false));

        //we always add all Java EE API modules, as the platform spec requires them to always be available
        //we do not just add the javaee.api module, as this breaks excludes

        for (final ModuleIdentifier moduleIdentifier : JAVA_EE_API_MODULES) {
            moduleSpecification.addSystemDependency(new ModuleDependency(moduleLoader, moduleIdentifier, true, false, true, false));
        }
    }
public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( Attachments . MODULE_SPECIFICATION ) ; final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; //add jboss-invocation classes needed by the proxies ModuleDependency invocation = new ModuleDependency ( moduleLoader , JBOSS_INVOCATION_ID , false , false , false , false ) ; invocation . addImportFilter ( PathFilters . is ( "org/jboss/invocation/proxy/classloading" ) , true ) ; invocation . addImportFilter ( PathFilters . acceptAll ( ) , false ) ; moduleSpecification . addSystemDependency ( invocation ) ; ModuleDependency ee = new ModuleDependency ( moduleLoader , JBOSS_AS_EE , false , false , false , false ) ; ee . addImportFilter ( PathFilters . is ( "org/jboss/as/ee/component/serialization" ) , true ) ; ee . addImportFilter ( PathFilters . is ( "org/jboss/as/ee/concurrent" ) , true ) ; ee . addImportFilter ( PathFilters . is ( "org/jboss/as/ee/concurrent/handle" ) , true ) ; ee . addImportFilter ( PathFilters . acceptAll ( ) , false ) ; moduleSpecification . addSystemDependency ( ee ) ; // add dep for naming permission moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , ModuleIdentifier . create ( WILDFLY_NAMING ) , false , false , false , false ) ) ; //we always add all Java EE API modules, as the platform spec requires them to always be available //we do not just add the javaee.api module, as this breaks excludes for ( final ModuleIdentifier moduleIdentifier : JAVA_EE_API_MODULES ) { moduleSpecification . addSystemDependency ( new ModuleDependency ( moduleLoader , moduleIdentifier , true , false , true , false ) ) ; } }
Add the EE APIs as a dependency to all deployments

@param phaseContext the deployment unit context
@throws DeploymentUnitProcessingException
Add the EE APIs as a dependency to all deployments