}
for (org.apache.openejb.jee.oejb2.EnterpriseBean enterpriseBean : openejbJarType.getEnterpriseBeans()) {
if (!(enterpriseBean instanceof MessageDrivenBeanType)) {
continue;
}
MessageDrivenBeanType bean = (MessageDrivenBeanType) enterpriseBean;
MessageDrivenBeanInfo messageDrivenBeanInfo = mdbs.get(bean.getEjbName());
if (messageDrivenBeanInfo == null) {
continue;
}
if (messageDrivenBeanInfo.containerId != null) {
// containerId already set
continue;
}
if (bean.getResourceAdapter() == null) {
throw new DeploymentException("Resource Adapter defined for MDB '" + bean.getEjbName() + "'");
}
AbstractNameQuery resourceAdapterNameQuery = getResourceAdapterNameQuery(bean.getResourceAdapter());
AbstractName resourceAdapterAbstractName = null;
try {
resourceAdapterAbstractName = earContext.findGBean(resourceAdapterNameQuery);
} catch (GBeanNotFoundException e) {
throw new DeploymentException("Resource Adapter for MDB '" + bean.getEjbName() + "'not found: " + resourceAdapterNameQuery);
}
Map properties = resourceAdapterAbstractName.getName();
String shortName = (String) properties.get("name");
String moduleName = (String) properties.get("ResourceAdapterModule");