/** * The <code>undeploy</code> method undeploys a package identified by a URL * * @param url the url to undeploy * @jmx.managed-operation */ public void undeploy(URL url) throws DeploymentException { String deploymentName = contextMap.remove(url); if (deploymentName != null) { try { delegate.removeDeployment(deploymentName); delegate.process(); } catch(Exception e) { DeploymentException ex = new DeploymentException("Error during undeploy of: "+url, e); throw ex; } } else { log.warn("undeploy '" + url + "' : package not deployed"); } }
/** * Describe <code>redeploy</code> method here. * * @param url an <code>URL</code> value * @exception DeploymentException if an error occurs * @jmx.managed-operation */ public void redeploy(URL url) throws DeploymentException { String deploymentName = contextMap.get(url); if (deploymentName != null) { try { Deployment deployment = delegate.getDeployment(deploymentName); delegate.addDeployment(deployment); delegate.process(); delegate.checkComplete(deployment); } catch (org.jboss.deployers.spi.DeploymentException e) { throw new DeploymentException(e); } } else { deploy(url); } }