throw new UnsupportedOperationException("More than one deployer found");
}
try {
for (int i = 0; i < modules.length; i++) {
TargetModuleIDImpl module = (TargetModuleIDImpl) modules[i];
URI configID = URI.create(module.getModuleID());
kernel.stopConfiguration(configID);
TargetImpl target = (TargetImpl) module.getTarget();
ObjectName storeName = target.getObjectName();
kernel.invoke(storeName, "uninstall", new Object[]{configID}, UNINSTALL_SIG);
Object[] args = {moduleArchive, deploymentPlan};
URI configId = (URI) kernel.invoke(deployer, "deploy", args, DEPLOY_SIG);
module = new TargetModuleIDImpl(module.getTarget(), configId.toString());
addModule(module);
}
complete("Completed");
} catch (Exception e) {
doFail(e);