// We must set all mapped name references back to null or Geronimo will blow up
unmapReferences(ejbJar, geronimoEjbJarType);
// create a xmlbeans version of the ejb-jar.xml file, because the jndi code is coupled based on xmlbeans objects
EjbJarType ejbJarType = XmlUtil.convertToXmlbeans(ejbJar);
ejbModule.setSpecDD(ejbJarType);
// convert the plan to xmlbeans since geronimo naming is coupled on xmlbeans objects
OpenejbGeronimoEjbJarType geronimoOpenejb = XmlUtil.convertToXmlbeans(geronimoEjbJarType);
ejbModule.setVendorDD(geronimoOpenejb);
// todo move namingBuilders.buildEnvironment() here when geronimo naming supports it
// initialize the naming builders
if (ejbJarType.getAssemblyDescriptor() != null) {
namingBuilder.initContext(ejbJarType.getAssemblyDescriptor(),
geronimoOpenejb,
ejbModule);
}
EjbDeploymentBuilder ejbDeploymentBuilder = new EjbDeploymentBuilder(earContext, ejbModule, namingBuilder, resourceEnvironmentSetter);