public synchronized void unDeploy() { try { if (wsToUnDeploy.size() > 0) { for (Object aWsToUnDeploy : wsToUnDeploy) { WSInfo wsInfo = (WSInfo) aWsToUnDeploy; if (wsInfo.getType() == WSInfo.TYPE_SERVICE) { //No matter what we need to undeploy the service // if user has deleted the file from the repository serviceDeployer.undeploy(wsInfo.getFileName()); } else { //We need to undeploy the service whether we have enable hotUpdate or not , // o.w what happen if someone delete the service from the repo Deployer deployer = wsInfo.getDeployer(); if (deployer != null) { deployer.undeploy(wsInfo.getFileName()); } } } } } catch (Exception e) { log.info(e); } wsToUnDeploy.clear(); }
public synchronized void unDeploy() { try { if (wsToUnDeploy.size() > 0) { for (Object aWsToUnDeploy : wsToUnDeploy) { WSInfo wsInfo = (WSInfo) aWsToUnDeploy; if (wsInfo.getType() == WSInfo.TYPE_SERVICE) { //No matter what we need to undeploy the service // if user has deleted the file from the repository serviceDeployer.undeploy(wsInfo.getFileName()); } else { //We need to undeploy the service whether we have enable hotUpdate or not , // o.w what happen if someone delete the service from the repo Deployer deployer = wsInfo.getDeployer(); if (deployer != null) { deployer.undeploy(wsInfo.getFileName()); } } } } } catch (Exception e) { log.info(e); } wsToUnDeploy.clear(); }
public synchronized void addWSInfoItem(URL url, Deployer deployer, int type) { // There is no way to set hot-update. // Here file.getAbsolutePath() = info.getFileName() WSInfo info = (WSInfo) currentJars.get(url.getPath()); if (info != null) { if (deploymentEngine.isHotUpdate()) { WSInfo wsInfo = new WSInfo(info.getFileName(), info.getLastModifiedDate(), deployer, type); deploymentEngine.addWSToUndeploy(wsInfo); // add entry to undeploy list DeploymentFileData deploymentFileData = new DeploymentFileData(url, deployer, null); deploymentEngine.addWSToDeploy(deploymentFileData); // add entry to deploylist } } else { info = getFileItem(url, deployer, type); } jarList.add(info.getFileName()); }
public synchronized void addWSInfoItem(URL url, Deployer deployer, int type) { // There is no way to set hot-update. // Here file.getAbsolutePath() = info.getFileName() WSInfo info = (WSInfo) currentJars.get(url.getPath()); if (info != null) { if (deploymentEngine.isHotUpdate()) { WSInfo wsInfo = new WSInfo(info.getFileName(), info.getLastModifiedDate(), deployer, type); deploymentEngine.addWSToUndeploy(wsInfo); // add entry to undeploy list DeploymentFileData deploymentFileData = new DeploymentFileData(url, deployer, null); deploymentEngine.addWSToDeploy(deploymentFileData); // add entry to deploylist } } else { info = getFileItem(url, deployer, type); } jarList.add(info.getFileName()); }
/** * First checks whether the file is already available by the * system call fileExists. If it is not deployed yet then adds to the jarList * and to the deployment engine as a new service or module. * While adding new item to jarList, first creates the WSInfo object and * then adds to the jarlist and actual jar file is added to DeploymentEngine. * <p/> * If the files already exists, then checks whether it has been updated * then changes the last update date of the wsInfo and adds two entries to * DeploymentEngine - one for new deployment and other for undeployment. * * @param file actual jar files for either Module or service */ public synchronized void addWSInfoItem(File file, Deployer deployer , int type) { WSInfo info = (WSInfo) currentJars.get(file.getAbsolutePath()); if (info != null) { if (deploymentEngine.isHotUpdate() && isModified(file, info)) { WSInfo wsInfo = new WSInfo(info.getFileName(), info.getLastModifiedDate(), deployer,type); deploymentEngine.addWSToUndeploy(wsInfo); // add entry to undeploy list DeploymentFileData deploymentFileData = new DeploymentFileData(file, deployer); deploymentEngine.addWSToDeploy(deploymentFileData); // add entry to deploylist } } else { info = getFileItem(file, deployer, type); setLastModifiedDate(file, info); } jarList.add(info.getFileName()); }
/** * First checks whether the file is already available by the * system call fileExists. If it is not deployed yet then adds to the jarList * and to the deployment engine as a new service or module. * While adding new item to jarList, first creates the WSInfo object and * then adds to the jarlist and actual jar file is added to DeploymentEngine. * <p/> * If the files already exists, then checks whether it has been updated * then changes the last update date of the wsInfo and adds two entries to * DeploymentEngine - one for new deployment and other for undeployment. * * @param file actual jar files for either Module or service */ public synchronized void addWSInfoItem(File file, Deployer deployer , int type) { WSInfo info = (WSInfo) currentJars.get(file.getAbsolutePath()); if (info != null) { if (deploymentEngine.isHotUpdate() && isModified(file, info)) { WSInfo wsInfo = new WSInfo(info.getFileName(), info.getLastModifiedDate(), deployer,type); deploymentEngine.addWSToUndeploy(wsInfo); // add entry to undeploy list DeploymentFileData deploymentFileData = new DeploymentFileData(file, deployer); deploymentEngine.addWSToDeploy(deploymentFileData); // add entry to deploylist } } else { info = getFileItem(file, deployer, type); setLastModifiedDate(file, info); } jarList.add(info.getFileName()); }