public void undeploy(Archive<?> archive) throws DeploymentException {
BundleHandle handle = deployedBundles.remove(archive.getName());
if (handle != null) {
try {
FrameworkMBean frameworkMBean = jmxSupport.getFrameworkMBean();
frameworkMBean.uninstallBundle(handle.getBundleId());
} catch (IOException ex) {
log.errorf(ex, "Cannot undeploy: %s" + archive.getName());
}
}
}