tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1138743 - in /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb: assembler/classic/Assembler.java core/CoreContainerSystem.java spi/ContainerSystem.java
Date Thu, 23 Jun 2011 06:11:13 GMT
Author: xuhaihong
Date: Thu Jun 23 06:11:12 2011
New Revision: 1138743

URL: http://svn.apache.org/viewvc?rev=1138743&view=rev
Log:
OPENEJB-1604 Remove AppContext while destorying the application

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java?rev=1138743&r1=1138742&r2=1138743&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
Thu Jun 23 06:11:12 2011
@@ -58,7 +58,6 @@ import org.apache.geronimo.connector.wor
 import org.apache.geronimo.connector.work.TransactionContextHandler;
 import org.apache.geronimo.connector.work.WorkContextHandler;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
-import org.apache.geronimo.transaction.manager.XAWork;
 import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.BeanType;
@@ -1105,6 +1104,8 @@ public class Assembler extends Assembler
             }
         }
 
+        containerSystem.removeAppContext(appInfo.appId);
+
         ClassLoaderUtil.destroyClassLoader(appInfo.path);
 
         if (undeployException.getCauses().size() > 0) {

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java?rev=1138743&r1=1138742&r2=1138743&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/CoreContainerSystem.java
Thu Jun 23 06:11:12 2011
@@ -133,7 +133,15 @@ public class CoreContainerSystem impleme
     }
 
     @Override
+    public AppContext getAppContext(Object id) {
+        return apps.get(id);
+    }
+
     public void addAppContext(AppContext appContext) {
         apps.put(appContext.getId(), appContext);
     }
+    
+    public void removeAppContext(Object id) {
+        apps.remove(id);
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java?rev=1138743&r1=1138742&r2=1138743&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/spi/ContainerSystem.java
Thu Jun 23 06:11:12 2011
@@ -39,6 +39,6 @@ public interface ContainerSystem {
     Context getJNDIContext();
 
     List<AppContext> getAppContexts();
-
-    void addAppContext(AppContext appContext);
+    
+    AppContext getAppContext(Object id);
 }
\ No newline at end of file



Mime
View raw message