}
final List<ServiceName> dependencies = deploymentUnit.getAttachmentList(Attachments.JNDI_DEPENDENCIES);
BeanDeploymentArchiveImpl rootBda = deploymentUnit
.getAttachment(WeldAttachments.DEPLOYMENT_ROOT_BEAN_DEPLOYMENT_ARCHIVE);
if (rootBda == null) {
// this archive is not actually a bean archive.
// then use the top level root bda
rootBda = topLevelDeployment.getAttachment(WeldAttachments.DEPLOYMENT_ROOT_BEAN_DEPLOYMENT_ARCHIVE);
}
if (rootBda == null) {
WeldLogger.ROOT_LOGGER.couldNotFindBeanManagerForDeployment(deploymentUnit.getName());
return;
}
final ServiceName weldServiceName = topLevelDeployment.getServiceName().append(WeldBootstrapService.SERVICE_NAME);
// add the BeanManager service
final ServiceName beanManagerServiceName = BeanManagerService.serviceName(deploymentUnit);
BeanManagerService beanManagerService = new BeanManagerService(rootBda.getId());
serviceTarget.addService(beanManagerServiceName, beanManagerService).addDependency(weldServiceName,
WeldBootstrapService.class, beanManagerService.getWeldContainer()).install();
final EEModuleDescription moduleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);