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());