//create a CDI injection factory
EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);
final Module topLevelModule = topLevelDeployment.getAttachment(Attachments.MODULE);
if(eeModuleDescription != null) {
eeModuleDescription.addInjectionFactory(new WeldInjectionFactory(phaseContext.getServiceTarget(),deploymentUnit,topLevelModule.getClassLoader()));
}
final String beanArchiveIdPrefix;
if (deploymentUnit.getParent() == null) {
beanArchiveIdPrefix = deploymentUnit.getName();
} else {