tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r702220 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
Date Mon, 06 Oct 2008 18:34:21 GMT
Author: dblevins
Date: Mon Oct  6 11:34:20 2008
New Revision: 702220

URL: http://svn.apache.org/viewvc?rev=702220&view=rev
Log:
Sort all the MDBs to the back of the list.  The Resource Adapter may attempt to use the MDB
on endpointActivation and the MDB may have references to other ejbs that would need to be
available first.

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.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=702220&r1=702219&r2=702220&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
Mon Oct  6 11:34:20 2008
@@ -696,6 +696,17 @@
             }
         });
 
+        // Now Sort all the MDBs to the back of the list.  The Resource Adapter
+        // may attempt to use the MDB on endpointActivation and the MDB may have
+        // references to other ejbs that would need to be available first.
+        Collections.sort(deployments, new Comparator<DeploymentInfo>(){
+            public int compare(DeploymentInfo a, DeploymentInfo b) {
+                int aa = (a.getComponentType() == BeanType.MESSAGE_DRIVEN) ? 1 : 0;
+                int bb = (b.getComponentType() == BeanType.MESSAGE_DRIVEN) ? 1 : 0;
+                return aa - bb;
+            }
+        });
+
         // Sort all the beans with references to the back of the list.  Beans
         // without references to ther beans will be deployed first.
         return References.sort(deployments, new References.Visitor<DeploymentInfo>(){



Mime
View raw message