You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/12/13 15:31:45 UTC
svn commit: r486673 -
/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
Author: gnodet
Date: Wed Dec 13 06:31:44 2006
New Revision: 486673
URL: http://svn.apache.org/viewvc?view=rev&rev=486673
Log:
SM-410: Classloader not destroyed when component is uninstalled
Modified:
incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java?view=diff&rev=486673&r1=486672&r2=486673
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java (original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java Wed Dec 13 06:31:44 2006
@@ -260,8 +260,18 @@
String libraryName = root.getSharedLibrary().getIdentification().getName();
entry.type = "library";
entry.name = libraryName;
- installationService.doInstallSharedLibrary(tmpDir, root.getSharedLibrary());
- checkPendingComponents();
+ try {
+ if (container.getRegistry().getSharedLibrary(libraryName) != null) {
+ container.getRegistry().unregisterSharedLibrary(libraryName);
+ environmentContext.removeSharedLibraryDirectory(libraryName);
+ }
+ installationService.doInstallSharedLibrary(tmpDir, root.getSharedLibrary());
+ checkPendingComponents();
+ } catch (Exception e) {
+ String errStr = "Failed to update SharedLibrary: " + libraryName;
+ log.error(errStr, e);
+ throw new DeploymentException(errStr, e);
+ }
} else if (root.getServiceAssembly() != null) {
ServiceAssembly sa = root.getServiceAssembly();
String name = sa.getIdentification().getName();