servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r486673 - /incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
Date Wed, 13 Dec 2006 14:31:45 GMT
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();



Mime
View raw message