geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1094859 - /geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModule.java
Date Tue, 19 Apr 2011 05:48:16 GMT
Author: xuhaihong
Date: Tue Apr 19 05:48:16 2011
New Revision: 1094859

URL: http://svn.apache.org/viewvc?rev=1094859&view=rev
Log:
Only destroy the classloader if it is TempClassLoader from OpenEBJ

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModule.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModule.java?rev=1094859&r1=1094858&r2=1094859&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModule.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModule.java
Tue Apr 19 05:48:16 2011
@@ -30,6 +30,7 @@ import org.apache.geronimo.openejb.Geron
 import org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType;
 import org.apache.openejb.ClassLoaderUtil;
 import org.apache.openejb.config.ConfigurationFactory;
+import org.apache.openejb.core.TempClassLoader;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.EnterpriseBean;
 import org.apache.openejb.jee.oejb3.OpenejbJar;
@@ -125,8 +126,10 @@ public class EjbModule extends EJBModule
 
     @Override
     public void close() {
-        ClassLoaderUtil.destroyClassLoader(ejbModule.getClassLoader().getParent());
-        ClassLoaderUtil.destroyClassLoader(ejbModule.getClassLoader());
+        if (ejbModule.getClassLoader() instanceof TempClassLoader) {
+            ClassLoaderUtil.destroyClassLoader(ejbModule.getClassLoader().getParent());
+            ClassLoaderUtil.destroyClassLoader(ejbModule.getClassLoader());
+        }
         super.close();
     }
 



Mime
View raw message