* @param location
* @throws DeploymentException
*/
public void removeArchive(String location) throws DeploymentException {
log.info("Attempting to remove archive at: " + location);
Descriptor root = (Descriptor) descriptorMap.remove(location);
if (root != null) {
try {
container.getBroker().suspend();
if (root.getComponent() != null) {
String componentName = root.getComponent().getIdentification().getName();
log.info("Uninstalling Component: " + componentName);
autoRemoveSAs(componentName);
installationService.unloadInstaller(componentName, true);
}
if (root.getSharedLibrary() != null) {
String name = root.getSharedLibrary().getIdentification().getName();
log.info("removing shared library: " + name);
installationService.uninstallSharedLibrary(name);
}
if (root.getServiceAssembly() != null) {
ServiceAssembly sa = root.getServiceAssembly();
String name = sa.getIdentification().getName();
log.info("removing service assembly " + name);
try {
if (deploymentService.isSaDeployed(name)) {
deploymentService.shutDown(name);