public void buildEnc() throws DeploymentException {
//
// XMLBeans types must be use because Geronimo naming building is coupled via XMLBeans objects
//
EjbJarType ejbJarType = (EjbJarType) ejbModule.getSpecDD();
if (!ejbJarType.getMetadataComplete()) {
// Create a classfinder and populate it for the naming builder(s). The absence of a
// classFinder in the module will convey whether metadata-complete is set (or not)
ejbModule.setClassFinder(createEjbJarClassFinder(ejbModule));
}
Map<JndiKey, Map<String, Object>> moduleJndiContext = NamingBuilder.JNDI_KEY.get(ejbModule.getSharedContext());
EnterpriseBeansType enterpriseBeans = ejbJarType.getEnterpriseBeans();
if (enterpriseBeans != null) {
for (SessionBeanType xmlbeansEjb : enterpriseBeans.getSessionArray()) {
String ejbName = xmlbeansEjb.getEjbName().getStringValue().trim();
GBeanData gbean = getEjbGBean(ejbName);
ResourceRefType[] resourceRefs = xmlbeansEjb.getResourceRefArray();
addEnc(gbean, xmlbeansEjb, resourceRefs, moduleJndiContext);
}
for (MessageDrivenBeanType xmlbeansEjb : enterpriseBeans.getMessageDrivenArray()) {
String ejbName = xmlbeansEjb.getEjbName().getStringValue().trim();
GBeanData gbean = getEjbGBean(ejbName);
ResourceRefType[] resourceRefs = xmlbeansEjb.getResourceRefArray();
addEnc(gbean, xmlbeansEjb, resourceRefs, moduleJndiContext);
}
for (EntityBeanType xmlbeansEjb : enterpriseBeans.getEntityArray()) {
String ejbName = xmlbeansEjb.getEjbName().getStringValue().trim();
GBeanData gbean = getEjbGBean(ejbName);
ResourceRefType[] resourceRefs = xmlbeansEjb.getResourceRefArray();
addEnc(gbean, xmlbeansEjb, resourceRefs, moduleJndiContext);
}
}
if (!ejbJarType.getMetadataComplete()) {
ejbJarType.setMetadataComplete(true);
ejbModule.setOriginalSpecDD(ejbModule.getSpecDD().toString());
}
}