* @param context The service activator context
*/
@Override
public void activate(final ServiceActivatorContext context) {
final BatchBuilder batchBuilder = context.getBatchBuilder();
batchBuilder.addServiceValueIfNotExist(DeploymentChainProviderService.SERVICE_NAME,
new DeploymentChainProviderService());
final Value<DeploymentChain> deploymentChainValue = Values.immediateValue((DeploymentChain) new DeploymentChainImpl(
RAR_DEPLOYMENT_CHAIN_SERVICE_NAME.toString()));
final DeploymentChainService deploymentChainService = new DeploymentChainService(deploymentChainValue);
batchBuilder.addService(RAR_DEPLOYMENT_CHAIN_SERVICE_NAME, deploymentChainService).addDependency(
DeploymentChainProviderService.SERVICE_NAME,
DeploymentChainProvider.class,
new DeploymentChainProviderInjector<DeploymentChain>(deploymentChainValue, new RaDeploymentChainSelector(),
RAR_DEPLOYMENT_CHAIN_PRIORITY));
addDeploymentProcessor(batchBuilder, new NestedJarInlineProcessor(), NestedJarInlineProcessor.PRIORITY);
addDeploymentProcessor(batchBuilder, new ManifestAttachmentProcessor(), ManifestAttachmentProcessor.PRIORITY);
addDeploymentProcessor(batchBuilder, new AnnotationIndexProcessor(), AnnotationIndexProcessor.PRIORITY);
addDeploymentProcessor(batchBuilder, new RarConfigProcessor(), RarConfigProcessor.PRIORITY);
addDeploymentProcessor(batchBuilder, new ModuleDependencyProcessor(), ModuleDependencyProcessor.PRIORITY);
addDeploymentProcessor(batchBuilder, new ModuleConfigProcessor(), ModuleConfigProcessor.PRIORITY);
// add resources here
final InjectedValue<DeploymentModuleLoader> deploymentModuleLoaderValue = new InjectedValue<DeploymentModuleLoader>();
DeploymentModuleLoaderProcessor deploymentLoaderProcessor = new DeploymentModuleLoaderProcessor(
deploymentModuleLoaderValue);
addDeploymentProcessor(batchBuilder, deploymentLoaderProcessor, DeploymentModuleLoaderProcessor.PRIORITY)
.addDependency(DeploymentModuleLoaderService.SERVICE_NAME, DeploymentModuleLoader.class,
deploymentModuleLoaderValue);
addDeploymentProcessor(batchBuilder, new ModuleDeploymentProcessor(), ModuleDeploymentProcessor.PRIORITY);
addDeploymentProcessor(batchBuilder, new ModuleContextProcessor(), ModuleContextProcessor.PRIORITY);
MdrService mdrService = new MdrService();
batchBuilder.addService(ConnectorServices.IRONJACAMAR_MDR, mdrService);
ResourceAdapterDeploymentRegistryService registryService = new ResourceAdapterDeploymentRegistryService();
batchBuilder.addService(ConnectorServices.RESOURCE_ADAPTER_REGISTRY_SERVICE, registryService);
JndiStrategyService jndiStrategyService = new JndiStrategyService();
batchBuilder.addService(ConnectorServices.JNDI_STRATEGY_SERVICE, jndiStrategyService);
RaDeploymentParsingProcessor raDeploymentParsingProcessor = new RaDeploymentParsingProcessor();
addDeploymentProcessor(batchBuilder, raDeploymentParsingProcessor, RaDeploymentParsingProcessor.PRIORITY);
IronJacamarDeploymentParsingProcessor ironJacamarDeploymentParsingProcessor = new IronJacamarDeploymentParsingProcessor();