while (it.hasNext() == true) {
/*
* Fetch the module part types that the deployer supports. If none,
* just continue to the next module.
*/
ModuleDeployerSPI deployer = it.next();
String[] partTypes = deployer.getTypes();
if (partTypes == null) {
continue;
}
/*
* Loop through each part type and see if there is a module part
*/
for (String partType : partTypes) {
if (parts.containsKey(partType) == true) {
try {
logger.info("[DEPOY] Deploying " + module.getName() + " to " + deployer.getName());
deployer.deploy(partType, module, parts.get(partType));
} catch (java.lang.Exception excp) {
/*
* Catch all exceptions here. Report them and pass them
* up as DeployerException, but continue to
* the remainder of the deployers.
*/
logger.log(Level.WARNING, "[DEPLOY] Failed", excp);
deployException = new DeployerException(deployer.getName(), module);
}
}
}
}