ejbModule.setOriginalSpecDD(ejbModule.getSpecDD().toString());
}
}
private void addEnc(GBeanData gbean, XmlObject xmlbeansEjb, ResourceRefType[] resourceRefs, Map<JndiKey, Map<String, Object>> moduleJndiContext) throws DeploymentException {
OpenejbGeronimoEjbJarType geronimoOpenejb = ejbModule.getVendorDD();
//
// Build ENC
//
// Geronimo uses a map to pass data to the naming build and for the results data
Map<EARContext.Key, Object> buildingContext = new HashMap<EARContext.Key, Object>();
Map<JndiKey, Map<String, Object>> jndiContext = new HashMap<JndiKey, Map<String, Object>>();
buildingContext.put(NamingBuilder.JNDI_KEY, jndiContext);
buildingContext.put(NamingBuilder.GBEAN_NAME_KEY, gbean.getAbstractName());
((AnnotatedEjbJar) ejbModule.getAnnotatedApp()).setBean(xmlbeansEjb);
namingBuilder.buildNaming(xmlbeansEjb,
geronimoOpenejb,
ejbModule, buildingContext);
Map<String, Object> compContext = jndiContext.get(JndiScope.comp);
gbean.setAttribute("componentContextMap", compContext);
//
// Process resource refs
//
GerResourceRefType[] gerResourceRefs = null;
if (geronimoOpenejb != null) {
gerResourceRefs = geronimoOpenejb.getResourceRefArray();
}
GBeanResourceEnvironmentBuilder refBuilder = new GBeanResourceEnvironmentBuilder(gbean);
resourceEnvironmentSetter.setResourceEnvironment(refBuilder, resourceRefs, gerResourceRefs);
}