Search in sources :

Example 1 with ModuleDependencyProcessor

use of org.jboss.as.server.deployment.module.ModuleDependencyProcessor in project wildfly by wildfly.

the class BeanDeploymentTestCase method setupServices.

@Override
protected void setupServices(final ServiceTarget serviceTarget) throws Exception {
    super.setupServices(serviceTarget);
    final DeploymentChain deploymentChain = new DeploymentChainImpl();
    deploymentChain.addProcessor(new ManifestAttachmentProcessor(), Phase.PARSE_MANIFEST);
    deploymentChain.addProcessor(new AnnotationIndexProcessor(), Phase.PARSE_ANNOTATION_INDEX);
    deploymentChain.addProcessor(new ModuleDependencyProcessor(), Phase.DEPENDENCIES_MODULE);
    deploymentChain.addProcessor(new ModuleConfigProcessor(), Phase.MODULARIZE_CONFIG);
    deploymentChain.addProcessor(new DeploymentModuleLoaderProcessor(new DeploymentModuleLoaderImpl(mainModuleLoader)), Phase.MODULARIZE_DEPLOYMENT_MODULE_LOADER);
    deploymentChain.addProcessor(new ModuleDeploymentProcessor(), Phase.MODULARIZE_DEPLOYMENT);
    deploymentChain.addProcessor(new KernelDeploymentParsingProcessor(), Phase.PARSE_MC_BEAN_DEPLOYMENT);
    deploymentChain.addProcessor(new ParsedKernelDeploymentProcessor(), Phase.INSTALL_MC_BEAN_DEPLOYMENT);
    serviceTarget.addService(DeploymentChain.SERVICE_NAME, new DeploymentChainService(deploymentChain));
    Service<Context> ns = new AbstractService<Context>() {

        @Override
        public Context getValue() throws IllegalStateException {
            try {
                return new MockContext();
            } catch (NamingException e) {
                throw new IllegalStateException(e);
            }
        }
    };
    serviceTarget.addService(ContextNames.GLOBAL_CONTEXT_SERVICE_NAME, ns);
}
Also used : Context(javax.naming.Context) DeploymentModuleLoaderImpl(org.jboss.as.server.deployment.module.DeploymentModuleLoaderImpl) AbstractService(org.jboss.msc.service.AbstractService) ModuleDependencyProcessor(org.jboss.as.server.deployment.module.ModuleDependencyProcessor) ModuleDeploymentProcessor(org.jboss.as.server.deployment.module.ModuleDeploymentProcessor) AnnotationIndexProcessor(org.jboss.as.deployment.processor.AnnotationIndexProcessor) NamingException(javax.naming.NamingException) ManifestAttachmentProcessor(org.jboss.as.server.deployment.module.ManifestAttachmentProcessor)

Aggregations

Context (javax.naming.Context)1 NamingException (javax.naming.NamingException)1 AnnotationIndexProcessor (org.jboss.as.deployment.processor.AnnotationIndexProcessor)1 DeploymentModuleLoaderImpl (org.jboss.as.server.deployment.module.DeploymentModuleLoaderImpl)1 ManifestAttachmentProcessor (org.jboss.as.server.deployment.module.ManifestAttachmentProcessor)1 ModuleDependencyProcessor (org.jboss.as.server.deployment.module.ModuleDependencyProcessor)1 ModuleDeploymentProcessor (org.jboss.as.server.deployment.module.ModuleDeploymentProcessor)1 AbstractService (org.jboss.msc.service.AbstractService)1