geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r397296 - in /geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee: ApplicationInfo.java deployment/EARConfigBuilder.java
Date Wed, 26 Apr 2006 20:50:47 GMT
Author: djencks
Date: Wed Apr 26 13:50:46 2006
New Revision: 397296

URL: http://svn.apache.org/viewcvs?rev=397296&view=rev
Log:
Clarify that we are preserving the order of modules in application.xml (and ext-modules in
geronimo-application.xml)

Modified:
    geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java
    geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java?rev=397296&r1=397295&r2=397296&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java
(original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java
Wed Apr 26 13:50:46 2006
@@ -17,6 +17,7 @@
 package org.apache.geronimo.j2ee;
 
 import java.util.Set;
+import java.util.LinkedHashSet;
 
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.repository.Environment;
@@ -32,14 +33,14 @@
     private AbstractName baseName;
     private XmlObject specDD;
     private XmlObject vendorDD;
-    private Set modules;
+    private LinkedHashSet modules;
     private Set moduleLocations;
     private String originalSpecDD;
 
     public ApplicationInfo() {
     }
 
-    public ApplicationInfo(ConfigurationModuleType type, Environment environment, AbstractName
baseName, XmlObject specDD, XmlObject vendorDD, Set modules, Set moduleLocations, String originalSpecDD)
{
+    public ApplicationInfo(ConfigurationModuleType type, Environment environment, AbstractName
baseName, XmlObject specDD, XmlObject vendorDD, LinkedHashSet modules, Set moduleLocations,
String originalSpecDD) {
         assert type != null;
         assert environment != null;
         assert modules != null;
@@ -95,11 +96,11 @@
         this.specDD = specDD;
     }
 
-    public Set getModules() {
+    public LinkedHashSet getModules() {
         return modules;
     }
 
-    public void setModules(Set modules) {
+    public void setModules(LinkedHashSet modules) {
         this.modules = modules;
     }
 

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=397296&r1=397295&r2=397296&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
(original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Wed Apr 26 13:50:46 2006
@@ -273,7 +273,7 @@
                 module.getModuleName(),
                 null,
                 null,
-                Collections.singleton(module),
+                new LinkedHashSet(Collections.singleton(module)),
                 Collections.EMPTY_SET,
                 null);
     }
@@ -336,7 +336,7 @@
         // todo change module so you can extract the real module path back out.. then we
can eliminate
         // the moduleLocations and have addModules return the modules
         Set moduleLocations = new HashSet();
-        Set modules = new LinkedHashSet();
+        LinkedHashSet modules = new LinkedHashSet();
         try {
             addModules(earFile, application, gerApplication, moduleLocations, modules, environment,
earName);
         } catch (Throwable e) {
@@ -455,7 +455,7 @@
             GerApplicationType geronimoApplication = (GerApplicationType) applicationInfo.getVendorDD();
 
             // each module installs it's files into the output context.. this is different
for each module type
-            Set modules = applicationInfo.getModules();
+            LinkedHashSet modules = applicationInfo.getModules();
             for (Iterator iterator = modules.iterator(); iterator.hasNext();) {
                 Module module = (Module) iterator.next();
                 getBuilder(module).installModule(earFile, earContext, module, configurationStores,
targetConfigurationStore, repositories);
@@ -577,11 +577,12 @@
         return filter;
     }
 
-    private void addModules(JarFile earFile, ApplicationType application, GerApplicationType
gerApplication, Set moduleLocations, Set modules, Environment environment, AbstractName earName)
throws DeploymentException {
+    private void addModules(JarFile earFile, ApplicationType application, GerApplicationType
gerApplication, Set moduleLocations, LinkedHashSet modules, Environment environment, AbstractName
earName) throws DeploymentException {
         Map altVendorDDs = new HashMap();
         try {
             if (earFile != null) {
                 ModuleType[] moduleTypes = application.getModuleArray();
+                //paths is used to check that all modules in the geronimo plan are in the
application.xml.
                 Set paths = new HashSet();
                 for (int i = 0; i < moduleTypes.length; i++) {
                     ModuleType type = moduleTypes[i];



Mime
View raw message