servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r486666 - in /incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework: Registry.java SharedLibrary.java
Date Wed, 13 Dec 2006 14:21:17 GMT
Author: gnodet
Date: Wed Dec 13 06:21:16 2006
New Revision: 486666

URL: http://svn.apache.org/viewvc?view=rev&rev=486666
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/Registry.java
    incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java?view=diff&rev=486666&r1=486665&r2=486666
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
(original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
Wed Dec 13 06:21:16 2006
@@ -819,6 +819,7 @@
         if (sl != null) {
             try {
                 getContainer().getManagementContext().unregisterMBean(sl);
+                sl.dispose();
             } catch (JBIException e) {
                 log.error("Could not unregister MBean for shared library", e);
             }

Modified: incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java?view=diff&rev=486666&r1=486665&r2=486666
==============================================================================
--- incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java
(original)
+++ incubator/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/SharedLibrary.java
Wed Dec 13 06:21:16 2006
@@ -28,6 +28,7 @@
 import org.apache.servicemix.jbi.deployment.ClassPath;
 import org.apache.servicemix.jbi.management.AttributeInfoHelper;
 import org.apache.servicemix.jbi.management.MBeanInfoProvider;
+import org.apache.xbean.classloader.DestroyableClassLoader;
 import org.apache.xbean.classloader.JarFileClassLoader;
 
 public class SharedLibrary implements SharedLibraryMBean, MBeanInfoProvider {
@@ -41,6 +42,13 @@
         this.library = library;
         this.installationDir = installationDir;
         this.classLoader = createClassLoader();
+    }
+    
+    public void dispose() {
+        if (classLoader instanceof DestroyableClassLoader) {
+            ((DestroyableClassLoader) classLoader).destroy();
+        }
+        classLoader = null;
     }
 
     /**



Mime
View raw message