geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1133698 - /geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Date Thu, 09 Jun 2011 07:45:57 GMT
Author: genspring
Date: Thu Jun  9 07:45:57 2011
New Revision: 1133698

URL: http://svn.apache.org/viewvc?rev=1133698&view=rev
Log:
the module sequence should be the same order in DD if  <initialize-in-order> is set
to true in application.xml.

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

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=1133698&r1=1133697&r2=1133698&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Thu Jun  9 07:45:57 2011
@@ -592,9 +592,15 @@ public class EARConfigBuilder implements
 
             // Copy over all files that are _NOT_ modules (e.g. META-INF and APP-INF files)
             LinkedHashSet<String> moduleLocations = applicationInfo.getModuleLocations();
+            boolean initModulesInDDOrder = false;
             if (ConfigurationModuleType.EAR == applicationType && earFile != null)
{
                 //get the value of the library-directory element in spec DD
                 Application specDD = (Application) applicationInfo.getSpecDD();
+                
+                if(specDD!=null){
+                    initModulesInDDOrder = specDD.getInitializeInOrder();
+                }
+                
                 String libDir = getLibraryDirectory(specDD);
                 Collection<String> libClasspath = applicationInfo.getClassPath();
                 for (Enumeration<JarEntry> e = earFile.entries(); e.hasMoreElements();)
{
@@ -638,7 +644,9 @@ public class EARConfigBuilder implements
             
             List<Module<?,?>> modules = new ArrayList<Module<?,?>>();
             modules.addAll(applicationInfo.getModules());
-            Collections.sort(modules, new Module.ModulePriorityComparator());
+            if (!initModulesInDDOrder){
+                Collections.sort(modules, new Module.ModulePriorityComparator());
+            }
                 
             for (Module<?,?> module : modules) {
                 getBuilder(module).installModule(earFile, earContext, module, configurationStores,
targetConfigurationStore, repositories);



Mime
View raw message