paths.add(type.getJava().getStringValue());
}
}
// build map from module path to alt vendor dd
GerModuleType gerModuleTypes[] = gerApplication.getModuleArray();
for (int i = 0; i < gerModuleTypes.length; i++) {
GerModuleType gerModule = gerModuleTypes[i];
String path = null;
if (gerModule.isSetEjb()) {
path = gerModule.getEjb().getStringValue();
} else if (gerModule.isSetWeb()) {
path = gerModule.getWeb().getStringValue();
} else if (gerModule.isSetConnector()) {
path = gerModule.getConnector().getStringValue();
} else if (gerModule.isSetJava()) {
path = gerModule.getJava().getStringValue();
}
if (!paths.contains(path)) {
throw new DeploymentException("Geronimo deployment plan refers to module '" + path + "' but that was not defined in the META-INF/application.xml");
}
if (gerModule.isSetAltDd()) {
// the the url of the alt dd
try {
altVendorDDs.put(path, DeploymentUtil.toTempFile(earFile, gerModule.getAltDd().getStringValue()));
} catch (IOException e) {
throw new DeploymentException("Invalid alt vendor dd url: " + gerModule.getAltDd().getStringValue(), e);
}
} else {
//dd is included explicitly
XmlObject[] anys = gerModule.selectChildren(GerModuleType.type.qnameSetForWildcardElements());
if (anys.length != 1) {
throw new DeploymentException("Unexpected count of xs:any elements in embedded vendor plan " + anys.length + " qnameset: " + GerModuleType.type.qnameSetForWildcardElements());
}
altVendorDDs.put(path, anys[0]);
}