[jboss-cvs] JBossAS SVN: r71275 - branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 25 17:32:04 EDT 2008


Author: miclark
Date: 2008-03-25 17:32:04 -0400 (Tue, 25 Mar 2008)
New Revision: 71275

Modified:
   branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/EjbModule.java
   branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/MessageDrivenContainer.java
Log:
Removed setting of the invoker proxy to null in the MessageDrivenContainer and moved destruction of the MDB's InstancePool from the MessageDrivenContainer to the EJBModule [JBPAPP-707]

Modified: branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/EjbModule.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/EjbModule.java	2008-03-25 20:49:27 UTC (rev 71274)
+++ branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/EjbModule.java	2008-03-25 21:32:04 UTC (rev 71275)
@@ -532,7 +532,6 @@
          }
 
          // cleanup container
-         con.setBeanMetaData(null);
          con.setWebClassLoader(null);
          con.setClassLoader(null);
          con.setLocalClassLoader(null);
@@ -543,6 +542,24 @@
          con.setRealmMapping(null);
          con.setSecurityProxy(null);
          con.proxyFactories.clear();
+         
+         // 
+         // Handle destruction of an MDB's instance pool which was
+         // created in the createMethodDrivenContainer method.
+         //
+         BeanMetaData bean = con.getBeanMetaData();
+         if (bean.isMessageDriven())
+         {
+            MessageDrivenContainer mdcon = (MessageDrivenContainer) con;
+            InstancePool ip = mdcon.getInstancePool();
+            if (ip != null)
+            {
+               ip.destroy();
+               ip.setContainer(null);
+            }
+         }
+
+         con.setBeanMetaData(null);
       }
 
       this.containers.clear();

Modified: branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/MessageDrivenContainer.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/MessageDrivenContainer.java	2008-03-25 20:49:27 UTC (rev 71274)
+++ branches/JBPAPP_4_2_0_GA_CP/server/src/main/org/jboss/ejb/MessageDrivenContainer.java	2008-03-25 21:32:04 UTC (rev 71275)
@@ -333,7 +333,7 @@
             String invokerBinding = (String) it.next();
             EJBProxyFactory ci = (EJBProxyFactory) proxyFactories.get(invokerBinding);
             ci.destroy();
-            ci.setContainer(null);
+
             try
             {
                ObjectName containerName = super.getJmxName();
@@ -348,9 +348,6 @@
             }
          }
 
-         // Destroy the pool
-         instancePool.destroy();
-         instancePool.setContainer(null);
          try
          {
             ObjectName containerName = super.getJmxName();




More information about the jboss-cvs-commits mailing list