deploymentService.deploy(tmp,sa);
deploymentService.deployServiceAssembly(tmp, sa);
    public void updateArchive(String location, ArchiveEntry entry, 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();                	entry.type = "component";                	entry.name = componentName;                     log.info("Uninstalling Component: "+componentName);                    installationService.unloadInstaller(componentName, true);                    installationService.install(tmp, root, autoStart);                    checkPendingSAs();                } else if (root.getSharedLibrary() != null) {                	String libraryName = root.getSharedLibrary().getIdentification().getName();                	entry.type = "component";                	entry.name = libraryName;                     installationService.doInstallSharedLibrary(tmp, root.getSharedLibrary());                } else if (root.getServiceAssembly() != null) {                    ServiceAssembly sa = root.getServiceAssembly();                    String name = sa.getIdentification().getName();                	entry.type = "assembly";                	entry.name = name;                     try {                        if (deploymentService.isSaDeployed(name)) {                            deploymentService.shutDown(name);                            deploymentService.undeploy(name);                            deploymentService.deploy(tmp,sa);                            if (autoStart) {                                deploymentService.start(name);                            }                        } else {                            // see if components are installed                            entry.componentNames = deploymentService.getComponentNames(sa);                            String missings = null;                            boolean canDeploy = true;                            for (Iterator it = entry.componentNames.iterator(); it.hasNext();) {                            	String componentName = (String) it.next();                            	if (!container.getRegistry().isLocalComponentRegistered(componentName)) {                            		canDeploy = false;                            		if (missings != null) {                            			missings += ", " + componentName;                            		} else {                            			missings = componentName;                            		}                            	}                            }                            if (canDeploy) {                                deploymentService.deploy(tmp, sa);                                if (autoStart){                                    deploymentService.start(name);                                }                            } else {                            	entry.pending = true;                                log.info("Components " + missings + " are not installed yet - adding ServiceAssembly "                                                + name + " to pending list");                                pendingSAs.put(tmp, entry);                            }                        }                    } catch (Exception e) {                        String errStr="Failed to update Service Assembly: "+name;                        log.error(errStr,e);                        throw new DeploymentException(errStr,e);                    }                }            } finally {                container.getBroker().resume();            }        }    }