final Collection<Metadata<Extension>> extensions = WeldPortableExtensions.getPortableExtensions(deploymentUnit).getExtensions();
final WeldDeployment deployment = new WeldDeployment(beanDeploymentArchives, extensions, module, subDeploymentLoaders, deploymentUnit, rootBeanDeploymentModule);
final WeldBootstrapService weldBootstrapService = new WeldBootstrapService(deployment, Environments.EE_INJECT, deploymentUnit.getName());
installBootstrapConfigurationService(deployment, parent);
weldBootstrapService.addWeldService(EjbInjectionServices.class, ejbInjectionServices);
weldBootstrapService.addWeldService(ResourceInjectionServices.class, resourceInjectionServices);
if (classFileServices != null) {
weldBootstrapService.addWeldService(ClassFileServices.class, classFileServices);
}
final JpaInjectionServices rootJpaInjectionServices = new WeldJpaInjectionServices(deploymentUnit);
final JaxwsInjectionServices rootJaxWsInjectionServices = new WeldJaxwsInjectionServices(deploymentUnit);
weldBootstrapService.addWeldService(JpaInjectionServices.class, rootJpaInjectionServices);
weldBootstrapService.addWeldService(JaxwsInjectionServices.class, rootJaxWsInjectionServices);
// add the weld service
final ServiceBuilder<WeldBootstrapService> weldBootstrapServiceBuilder = serviceTarget.addService(weldBootstrapServiceName, weldBootstrapService);
weldBootstrapServiceBuilder.addDependencies(TCCLSingletonService.SERVICE_NAME);