* @param autoStart
* @throws DeploymentException
*/
public void updateArchive(String location, boolean autoStart) throws DeploymentException {
File tmp = AutoDeploymentService.unpackLocation(environmentContext.getTmpDir(), location);
Descriptor root = AutoDeploymentService.buildDescriptor(tmp);
if (root != null) {
try {
container.getBroker().suspend();
if (root.getComponent() != null) {
String componentName = root.getComponent().getIdentification().getName();
log.info("Uninstalling Component: " + componentName);
if (installationService.unloadInstaller(componentName, true)) {
}
installationService.install(tmp, root, autoStart);
autoDeployServiceSA(componentName);
}
else if (root.getSharedLibrary() != null) {
installationService.doInstallSharedLibrary(tmp, root.getSharedLibrary());
}
else if (root.getServiceAssembly() != null) {
ServiceAssembly sa = root.getServiceAssembly();
String name = sa.getIdentification().getName();
try {
if (deploymentService.isSaDeployed(name)) {
deploymentService.shutDown(name);
deploymentService.undeploy(name);