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;
}
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);
}
}
Aggregations