geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: rev 47262 - in geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee: . deployment
Date Sun, 26 Sep 2004 22:29:27 GMT
Author: dain
Date: Sun Sep 26 15:29:25 2004
New Revision: 47262

Modified:
   geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java
   geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Log:
Changed code to look for the vendor dd within the application info instead 


Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java	(original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java	Sun
Sep 26 15:29:25 2004
@@ -14,12 +14,13 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package org.apache.geronimo.j2ee.dd;
+package org.apache.geronimo.j2ee;
 
 import java.net.URI;
 import java.util.Set;
 
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.xmlbeans.XmlObject;
 
 /**
  * @version $Revision$ $Date$
@@ -29,21 +30,25 @@
     private URI configId;
     private URI parentId;
     private String applicationName;
+    private XmlObject specDD;
+    private XmlObject vendorDD;
     private Set modules;
     private Set moduleLocations;
-    private String specDD;
+    private String originalSpecDD;
 
     public ApplicationInfo() {
     }
 
-    public ApplicationInfo(ConfigurationModuleType type, URI configId, URI parentId, String
applicationName, Set modules, Set moduleLocations, String specDD) {
+    public ApplicationInfo(ConfigurationModuleType type, URI configId, URI parentId, String
applicationName, XmlObject specDD, XmlObject vendorDD, Set modules, Set moduleLocations, String
originalSpecDD) {
         this.type = type;
         this.configId = configId;
         this.parentId = parentId;
         this.applicationName = applicationName;
+        this.specDD = specDD;
+        this.vendorDD = vendorDD;
         this.modules = modules;
         this.moduleLocations = moduleLocations;
-        this.specDD = specDD;
+        this.originalSpecDD = originalSpecDD;
     }
 
     public ConfigurationModuleType getType() {
@@ -78,6 +83,22 @@
         this.applicationName = applicationName;
     }
 
+    public XmlObject getVendorDD() {
+        return vendorDD;
+    }
+
+    public void setVendorDD(XmlObject vendorDD) {
+        this.vendorDD = vendorDD;
+    }
+
+    public XmlObject getSpecDD() {
+        return specDD;
+    }
+
+    public void setSpecDD(XmlObject specDD) {
+        this.specDD = specDD;
+    }
+
     public Set getModules() {
         return modules;
     }
@@ -94,11 +115,11 @@
         this.moduleLocations = moduleLocations;
     }
 
-    public String getSpecDD() {
-        return specDD;
+    public String getOriginalSpecDD() {
+        return originalSpecDD;
     }
 
-    public void setSpecDD(String specDD) {
-        this.specDD = specDD;
+    public void setOriginalSpecDD(String originalSpecDD) {
+        this.originalSpecDD = originalSpecDD;
     }
 }

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
(original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Sun Sep 26 15:29:25 2004
@@ -46,7 +46,7 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoFactory;
 import org.apache.geronimo.gbean.jmx.GBeanMBean;
-import org.apache.geronimo.j2ee.dd.ApplicationInfo;
+import org.apache.geronimo.j2ee.ApplicationInfo;
 import org.apache.geronimo.j2ee.management.impl.J2EEApplicationImpl;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
@@ -142,6 +142,8 @@
                 module.getConfigId(),
                 module.getParentId(),
                 "null",
+                null,
+                null,
                 Collections.singleton(module),
                 Collections.EMPTY_SET,
                 null);
@@ -216,6 +218,8 @@
                 configId,
                 parentId,
                 configId.toString(),
+                application,
+                gerApplication,
                 modules,
                 moduleLocations,
                 application.toString());
@@ -281,8 +285,8 @@
             }
 
             // add dependencies declared in the geronimo-application.xml
-            if (plan instanceof GerApplicationType) {
-                GerApplicationType geronimoApplication = (GerApplicationType) plan;
+            GerApplicationType geronimoApplication = (GerApplicationType) applicationInfo.getVendorDD();
+            if (geronimoApplication != null) {
                 GerDependencyType[] dependencies = geronimoApplication.getDependencyArray();
                 for (int i = 0; i < dependencies.length; i++) {
                     earContext.addDependency(getDependencyURI(dependencies[i]));
@@ -304,8 +308,7 @@
             }
 
             // add gbeans declared in the geronimo-application.xml
-            if (plan instanceof GerApplicationType) {
-                GerApplicationType geronimoApplication = (GerApplicationType) plan;
+            if (geronimoApplication != null) {
                 GerGbeanType[] gbeans = geronimoApplication.getGbeanArray();
                 for (int i = 0; i < gbeans.length; i++) {
                     GBeanHelper.addGbean(new GerGBeanAdapter(gbeans[i]), cl, earContext);
@@ -316,7 +319,7 @@
             if (ConfigurationModuleType.EAR == applicationType) {
                 GBeanMBean gbean = new GBeanMBean(J2EEApplicationImpl.GBEAN_INFO, cl);
                 try {
-                    gbean.setAttribute("deploymentDescriptor", applicationInfo.getSpecDD());
+                    gbean.setAttribute("deploymentDescriptor", applicationInfo.getOriginalSpecDD());
                 } catch (Exception e) {
                     throw new DeploymentException("Error initializing J2EEApplication managed
object");
                 }

Mime
View raw message