final Context moduleJndiContext = new JndiEncBuilder(ejbJar.moduleJndiEnc, moduleInjections, null, ejbJar.moduleName, ejbJar.moduleUri, ejbJar.uniqueId, classLoader)
.build(JndiEncBuilder.JndiScope.module);
final HashMap<String, BeanContext> deployments = new HashMap<String, BeanContext>();
final ModuleContext moduleContext = new ModuleContext(ejbJar.moduleName, ejbJar.moduleUri, ejbJar.uniqueId, context, moduleJndiContext, classLoader);
moduleContext.getProperties().putAll(ejbJar.properties);
final InterceptorBindingBuilder interceptorBindingBuilder = new InterceptorBindingBuilder(classLoader, ejbJar);
final MethodScheduleBuilder methodScheduleBuilder = new MethodScheduleBuilder();
for (final EnterpriseBeanInfo ejbInfo : ejbJar.enterpriseBeans) {
final ClassLoader loader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(moduleContext.getClassLoader());
try {
final EnterpriseBeanBuilder deploymentBuilder = new EnterpriseBeanBuilder(ejbInfo, moduleContext, moduleInjections);
final BeanContext bean = deploymentBuilder.build();
interceptorBindingBuilder.build(bean, ejbInfo);