Search in sources :

Example 36 with ComponentConfiguration

use of org.jboss.as.ee.component.ComponentConfiguration in project wildfly by wildfly.

the class WSComponentDescription method createConfiguration.

@Override
public ComponentConfiguration createConfiguration(final ClassReflectionIndex classIndex, final ClassLoader moduleClassLoader, final ModuleLoader moduleLoader) {
    final ComponentConfiguration cc = super.createConfiguration(classIndex, moduleClassLoader, moduleLoader);
    cc.setComponentCreateServiceFactory(WSComponentCreateServiceFactory.INSTANCE);
    return cc;
}
Also used : ComponentConfiguration(org.jboss.as.ee.component.ComponentConfiguration)

Example 37 with ComponentConfiguration

use of org.jboss.as.ee.component.ComponentConfiguration in project wildfly by wildfly.

the class EEConcurrencyContextHandleFactoryProcessor method deploy.

@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
    if (eeModuleDescription == null) {
        return;
    }
    final ComponentConfigurator componentConfigurator = new ComponentConfigurator() {

        @Override
        public void configure(DeploymentPhaseContext context, ComponentDescription description, final ComponentConfiguration configuration) throws DeploymentUnitProcessingException {
            final TransactionLeakContextHandleFactory transactionLeakContextHandleFactory = new TransactionLeakContextHandleFactory();
            context.addDependency(TransactionManagerService.SERVICE_NAME, TransactionManager.class, transactionLeakContextHandleFactory);
            configuration.getConcurrentContext().addFactory(transactionLeakContextHandleFactory);
        }
    };
    for (ComponentDescription componentDescription : eeModuleDescription.getComponentDescriptions()) {
        componentDescription.getConfigurators().add(componentConfigurator);
    }
}
Also used : ComponentConfiguration(org.jboss.as.ee.component.ComponentConfiguration) ComponentDescription(org.jboss.as.ee.component.ComponentDescription) EEModuleDescription(org.jboss.as.ee.component.EEModuleDescription) ComponentConfigurator(org.jboss.as.ee.component.ComponentConfigurator) DeploymentUnit(org.jboss.as.server.deployment.DeploymentUnit) DeploymentPhaseContext(org.jboss.as.server.deployment.DeploymentPhaseContext)

Aggregations

ComponentConfiguration (org.jboss.as.ee.component.ComponentConfiguration)37 DeploymentPhaseContext (org.jboss.as.server.deployment.DeploymentPhaseContext)28 DeploymentUnitProcessingException (org.jboss.as.server.deployment.DeploymentUnitProcessingException)26 ComponentDescription (org.jboss.as.ee.component.ComponentDescription)19 ViewConfiguration (org.jboss.as.ee.component.ViewConfiguration)19 ComponentConfigurator (org.jboss.as.ee.component.ComponentConfigurator)16 ViewConfigurator (org.jboss.as.ee.component.ViewConfigurator)15 ViewDescription (org.jboss.as.ee.component.ViewDescription)15 ImmediateInterceptorFactory (org.jboss.invocation.ImmediateInterceptorFactory)14 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)13 EJBViewDescription (org.jboss.as.ejb3.component.EJBViewDescription)11 Method (java.lang.reflect.Method)10 EEModuleDescription (org.jboss.as.ee.component.EEModuleDescription)9 ServiceName (org.jboss.msc.service.ServiceName)8 EJBComponentDescription (org.jboss.as.ejb3.component.EJBComponentDescription)7 DependencyConfigurator (org.jboss.as.ee.component.DependencyConfigurator)6 EEModuleConfiguration (org.jboss.as.ee.component.EEModuleConfiguration)6 SessionBeanComponentDescription (org.jboss.as.ejb3.component.session.SessionBeanComponentDescription)6 Module (org.jboss.modules.Module)6 ServiceBuilder (org.jboss.msc.service.ServiceBuilder)6