geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r915011 - in /geronimo/server/trunk/plugins: j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/ j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/ jetty8/geronimo-jetty8-builder/...
Date Mon, 22 Feb 2010 18:42:04 GMT
Author: djencks
Date: Mon Feb 22 18:42:04 2010
New Revision: 915011

URL: http://svn.apache.org/viewvc?rev=915011&view=rev
Log:
Merge with ear environment if we are using onely one bundle

Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java?rev=915011&r1=915010&r2=915011&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
Mon Feb 22 18:42:04 2010
@@ -118,6 +118,9 @@
  * @version $Rev$ $Date$
  */
 public abstract class AbstractWebModuleBuilder implements ModuleBuilder {
+    //are we combining all web apps into one bundle in an ear?
+    //TODO eliminate this
+    protected static final boolean COMBINED_BUNDLE = true;
 
     public final static NamingBuilder.Key<GBeanData> DEFAULT_JSP_SERVLET_KEY = new
NamingBuilder.Key<GBeanData>() {
         public GBeanData get(Map context) {
@@ -192,14 +195,14 @@
     }
 
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
-        return createModule(plan, moduleFile, ".", null, true, null, null, naming, idBuilder);
+        return createModule(plan, moduleFile, ".", null, null, null, null, naming, idBuilder);
     }
 
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl,
Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
-        return createModule(plan, moduleFile, targetPath, specDDUrl, false, (String) moduleContextInfo,
earName, naming, idBuilder);
+        return createModule(plan, moduleFile, targetPath, specDDUrl, environment, (String)
moduleContextInfo, earName, naming, idBuilder);
     }
 
-    protected abstract Module createModule(Object plan, JarFile moduleFile, String targetPath,
URL specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming,
ModuleIDBuilder idBuilder) throws DeploymentException;
+    protected abstract Module createModule(Object plan, JarFile moduleFile, String targetPath,
URL specDDUrl, Environment earEnvironment, String contextRoot, AbstractName earName, Naming
naming, ModuleIDBuilder idBuilder) throws DeploymentException;
 
     /**
      * Some servlets will have multiple url patterns.  However, webservice servlets

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java?rev=915011&r1=915010&r2=915011&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java
Mon Feb 22 18:42:04 2010
@@ -24,6 +24,7 @@
 import java.util.Collections;
 import java.util.jar.JarFile;
 
+import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.testsupport.XmlBeansTestSupport;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.EARContext;
@@ -152,7 +153,7 @@
             return null;
         }
 
-        protected Module createModule(Object plan, JarFile moduleFile, String targetPath,
URL specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming,
ModuleIDBuilder idBuilder) throws DeploymentException {
+        protected Module createModule(Object plan, JarFile moduleFile, String targetPath,
URL specDDUrl, Environment earEnvironment, String contextRoot, AbstractName earName, Naming
naming, ModuleIDBuilder idBuilder) throws DeploymentException {
             return null;
         }
 

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java?rev=915011&r1=915010&r2=915011&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
Mon Feb 22 18:42:04 2010
@@ -254,7 +254,7 @@
         return module;
     }
     
-    protected Module createModule(Object plan, JarFile moduleFile, String targetPath, URL
specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
+    protected Module createModule(Object plan, JarFile moduleFile, String targetPath, URL
specDDUrl, Environment earEnvironment, String contextRoot, AbstractName earName, Naming naming,
ModuleIDBuilder idBuilder) throws DeploymentException {
         assert moduleFile != null : "moduleFile is null";
         assert targetPath != null : "targetPath is null";
         assert !targetPath.endsWith("/") : "targetPath must not end with a '/'";
@@ -295,6 +295,7 @@
 
         Deployable deployable = new DeployableJarFile(moduleFile);
         // parse vendor dd
+        boolean standAlone = earEnvironment == null;
         JettyWebAppType jettyWebApp = getJettyWebApp(plan, deployable, standAlone, targetPath,
webApp);
         contextRoot = getContextRoot(jettyWebApp, contextRoot, webApp, standAlone, moduleFile,
targetPath);
 
@@ -305,6 +306,11 @@
             clusteringBuilders.buildEnvironment(jettyWebApp, environment);
         }
 
+        if (!standAlone && COMBINED_BUNDLE) {
+            EnvironmentBuilder.mergeEnvironments(earEnvironment, environment);
+            environment = earEnvironment;
+        }
+
         // Note: logic elsewhere depends on the default artifact ID being the file name less
extension (ConfigIDExtractor)
         String warName = new File(moduleFile.getName()).getName();
         if (warName.lastIndexOf('.') > -1) {

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=915011&r1=915010&r2=915011&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Mon Feb 22 18:42:04 2010
@@ -214,7 +214,7 @@
         return module;
     }
     
-    protected Module createModule(Object plan, JarFile moduleFile, String targetPath, URL
specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
+    protected Module createModule(Object plan, JarFile moduleFile, String targetPath, URL
specDDUrl, Environment earEnvironment, String contextRoot, AbstractName earName, Naming naming,
ModuleIDBuilder idBuilder) throws DeploymentException {
         assert moduleFile != null : "moduleFile is null";
         assert targetPath != null : "targetPath is null";
         assert !targetPath.endsWith("/") : "targetPath must not end with a '/'";
@@ -256,6 +256,7 @@
         
         Deployable deployable = new DeployableJarFile(moduleFile);
         // parse vendor dd
+        boolean standAlone = earEnvironment == null;
         TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, deployable, standAlone, targetPath,
webApp);
         contextRoot = getContextRoot(tomcatWebApp, contextRoot, webApp, standAlone, moduleFile,
targetPath);
 
@@ -266,6 +267,11 @@
             clusteringBuilders.buildEnvironment(tomcatWebApp, environment);
         }
 
+        if (!standAlone && COMBINED_BUNDLE) {
+            EnvironmentBuilder.mergeEnvironments(earEnvironment, environment);
+            environment = earEnvironment;
+        }
+
         // Note: logic elsewhere depends on the default artifact ID being the file name less
extension (ConfigIDExtractor)
         String warName = new File(moduleFile.getName()).getName();
         if (warName.lastIndexOf('.') > -1) {



Mime
View raw message