if (bdm == rootBeanDeploymentModule) {
continue; // the root module only has access to itself
}
// otherwise add all globally accessible modules to the module
// this will include the root module and ejb jars
bdm.addBeanDeploymentModules(globalBeanDeploymentModules);
}
final List<Metadata<Extension>> extensions = deploymentUnit.getAttachmentList(WeldAttachments.PORTABLE_EXTENSIONS);
final WeldDeployment deployment = new WeldDeployment(beanDeploymentArchives, extensions, module, subDeploymentLoaders);