classLoaderService.addSharedLibrary(installationDir, descriptor); }catch(IOException e){ log.error("Deployment of Shared Library failed",e);
container.getRegistry().registerSharedLibrary(descriptor, installationDir); } catch (Exception e) { log.error("Deployment of Shared Library failed", e);
    protected String doInstallSharedLibrary(File tmpDirectory,SharedLibrary descriptor) throws DeploymentException{        String result=null;        if(descriptor!=null){            try{                result=descriptor.getIdentification().getName();                File installationDir=environmentContext.createSharedLibraryDirectory(result);                if(installationDir.exists()){                    FileUtil.deleteFile(installationDir);                }                if(!tmpDirectory.renameTo(installationDir)){                    throw new DeploymentException("Unable to rename " + tmpDirectory + " to " + installationDir);                }                if (log.isDebugEnabled()) {                    log.debug("Moved " + tmpDirectory + " to " + installationDir);                }                classLoaderService.addSharedLibrary(installationDir, descriptor);            }catch(IOException e){                log.error("Deployment of Shared Library failed",e);                // remove any files created for installation                environmentContext.removeComponentRootDirectory(descriptor.getIdentification().getName());                throw new DeploymentException(e);            }        }        return result;    }