geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r902507 [2/3] - in /geronimo/server/trunk: framework/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ framework/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/ plugins/ plugins/axis/geronim...
Date Sat, 23 Jan 2010 23:28:13 GMT
Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/WebModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/WebModule.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/WebModule.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/WebModule.java Sat Jan 23 23:28:10 2010
@@ -18,6 +18,8 @@
 
 import java.util.jar.JarFile;
 
+import org.apache.geronimo.deployment.Deployable;
+import org.apache.geronimo.deployment.DeployableJarFile;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.deployment.annotation.AnnotatedWebApp;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
@@ -32,7 +34,11 @@
     public static final String WEB_APP_DATA = "WEB_APP_DATA";
 
     public WebModule(boolean standAlone, AbstractName moduleName, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String contextRoot, String namespace, AnnotatedWebApp annotatedWebApp) {
-        super(standAlone, moduleName, environment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, namespace, annotatedWebApp );
+        this(standAlone, moduleName, environment, new DeployableJarFile(moduleFile), targetPath, specDD, vendorDD, originalSpecDD, contextRoot, namespace, annotatedWebApp);
+    }
+    
+    public WebModule(boolean standAlone, AbstractName moduleName, Environment environment, Deployable deployable, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String contextRoot, String namespace, AnnotatedWebApp annotatedWebApp) {
+        super(standAlone, moduleName, environment, deployable, targetPath, specDD, vendorDD, originalSpecDD, namespace, annotatedWebApp );
         this.contextRoot = contextRoot;
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13NakedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13NakedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13NakedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13NakedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.util.JarUtils;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13Test.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13Test.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13Test.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder13Test.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.util.JarUtils;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.util.JarUtils;
 
@@ -33,7 +35,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDUnpackedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14AltDDUnpackedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.util.JarUtils;
 
@@ -33,7 +35,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar/", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.util.JarUtils;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14NakedUnpackedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.util.JarUtils;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar/", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14Test.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14Test.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14Test.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14Test.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.util.JarUtils;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder14UnpackedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar/", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
@@ -33,7 +35,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5AltDDUnpackedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
@@ -33,7 +35,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar/", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "test-war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5NakedUnpackedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar/", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5Test.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder5UnpackedTest.java Sat Jan 23 23:28:10 2010
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
+import java.util.jar.JarFile;
+
 import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.kernel.repository.Artifact;
 
@@ -34,7 +36,7 @@
         locations.put(null, new Artifact("org.apache.geronimo.testsupport", "test-ear-javaee_5", "3.0-SNAPSHOT", "ear"));
         ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "ejb.jar/", null, null, null, null);
         webConfigBuilder.contextRoot = contextRoot;
-        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
+        webConfigBuilder.webModule = new WebModule(false, webModuleName, null, (JarFile)null, "war.war/", null, null, null, contextRoot, WEB_NAMESPACE, null);
         connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "rar.rar/", null, null, null, null);
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java Sat Jan 23 23:28:10 2010
@@ -45,6 +45,10 @@
     private Bundle bundle;
     public Module connectorModule;
 
+    public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        return null;
+    }
+    
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName earName = naming.createRootName(new Artifact("test", "test-war", "", "rar"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
         AbstractName moduleName = naming.createChildName(earName, "rar", NameFactory.RESOURCE_ADAPTER_MODULE);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java Sat Jan 23 23:28:10 2010
@@ -41,6 +41,10 @@
     private Bundle bundle;
     public EJBModule ejbModule;
 
+    public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        return null;
+    }
+    
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName earName = naming.createRootName(new Artifact("test", "test-ejb-jar", "", "jar"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
         AbstractName moduleName = naming.createChildName(earName, "ejb-jar", NameFactory.EJB_MODULE);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/test/java/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java Sat Jan 23 23:28:10 2010
@@ -44,6 +44,10 @@
     public WebModule webModule;
     public String contextRoot;
 
+    public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        return null;
+    }
+    
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         AbstractName earName = naming.createRootName(new Artifact("test", "test-war", "", "war"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
         AbstractName moduleName = naming.createChildName(earName, "war", NameFactory.WEB_MODULE);

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java Sat Jan 23 23:28:10 2010
@@ -97,8 +97,8 @@
         }
 
         Bundle bundle = module.getEarContext().getDeploymentBundle();
-        Class jaxrpcClass = loadClass("javax.xml.rpc.Service", bundle);
-        Class jaxwsClass = loadClass("javax.xml.ws.Service", bundle);
+        Class jaxrpcClass = null;
+        Class jaxwsClass = null;
 
         XmlObject[] serviceRefs = specDD.selectChildren(serviceRefQNameSet);
 
@@ -107,6 +107,12 @@
         Map serviceRefMap = mapServiceRefs(gerServiceRefsUntyped);
 
         for (XmlObject serviceRef : serviceRefs) {
+            if (jaxrpcClass == null) {
+                jaxrpcClass = loadClass("javax.xml.rpc.Service", bundle);
+            }
+            if (jaxwsClass == null) {
+                jaxwsClass = loadClass("javax.xml.ws.Service", bundle);
+            }
             ServiceRefType serviceRefType = (ServiceRefType) convert(
                     serviceRef, JEE_CONVERTER, ServiceRefType.type);
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java Sat Jan 23 23:28:10 2010
@@ -138,6 +138,9 @@
     }
 
     //MBE methods
+    public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {        
+    }
+
     public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
     }
 

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=902507&r1=902506&r2=902507&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 Sat Jan 23 23:28:10 2010
@@ -354,9 +354,8 @@
         ModuleList moduleLocations = (ModuleList) module.getRootEarContext().getGeneralData().get(ModuleList.class);
         URI baseUri = URI.create(module.getTargetPath());
         URI resolutionUri = invertURI(baseUri);
-        earContext.getCompleteManifestClassPath(module.getModuleFile(), baseUri, resolutionUri, manifestcp, moduleLocations);
-
-
+        earContext.getCompleteManifestClassPath(module.getDeployable(), baseUri, resolutionUri, manifestcp, moduleLocations);
+        
         WebAppType webApp = (WebAppType) module.getSpecDD();
         if ((webApp.getSecurityConstraintArray().length > 0 || webApp.getSecurityRoleArray().length > 0)) {
             if (!hasSecurityRealmName) {

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=902507&r1=902506&r2=902507&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 Sat Jan 23 23:28:10 2010
@@ -132,6 +132,10 @@
             super(kernel, null, null, null, Collections.EMPTY_SET, null);
         }
 
+        public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+            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 {
             return null;
         }
@@ -145,6 +149,7 @@
         public String getSchemaNamespace() {
             return null;
         }
+        
     }
 
 

Modified: geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java (original)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java Sat Jan 23 23:28:10 2010
@@ -109,6 +109,9 @@
         this.namingBuilders = namingBuilders;
     }
 
+    public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+    }
+
     public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
     }
 

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java (original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java Sat Jan 23 23:28:10 2010
@@ -92,6 +92,9 @@
         this.wsGBeanData = kernel.getGBeanData(webServiceLinkTemplateName);
     }
 
+    public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+    }
+
     public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         if (this.defaultEnvironment != null) {
             EnvironmentBuilder.mergeEnvironments(environment, this.defaultEnvironment);

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=902507&r1=902506&r2=902507&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 Sat Jan 23 23:28:10 2010
@@ -38,6 +38,9 @@
 import javax.management.ObjectName;
 import javax.servlet.Servlet;
 import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.Deployable;
+import org.apache.geronimo.deployment.DeployableBundle;
+import org.apache.geronimo.deployment.DeployableJarFile;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
@@ -234,6 +237,72 @@
         return new GBeanData(kernel.getGBeanData(templateName));
     }
       
+    public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        if (bundle == null) {
+            throw new NullPointerException("bundle is null");
+        }
+        String contextPath = (String) bundle.getHeaders().get("Web-ContextPath");
+        if (contextPath == null) {
+            // not for us
+            return null;
+        }
+        
+        String specDD = null;
+        WebAppType webApp = null;
+        
+        URL specDDUrl = bundle.getEntry("WEB-INF/web.xml");
+        if (specDDUrl == null) {
+            webApp = WebAppType.Factory.newInstance();
+        } else {
+            try {
+                specDD = JarUtils.readAll(specDDUrl);
+
+                XmlObject parsed = XmlBeansUtil.parse(specDD);
+                WebAppDocument webAppDoc = convertToServletSchema(parsed);
+                webApp = webAppDoc.getWebApp();
+                check(webApp);
+            } catch (XmlException e) {
+                throw new DeploymentException("Error parsing web.xml for " + bundle.getSymbolicName(), e);
+            } catch (Exception e) {
+                throw new DeploymentException("Error reading web.xml for " + bundle.getSymbolicName(), e);
+            }
+        }
+        
+        AbstractName earName = null;
+        String targetPath = ".";   
+        boolean standAlone = true;
+        
+        Deployable deployable = new DeployableBundle(bundle);
+        // parse vendor dd
+        JettyWebAppType jettyWebApp = getJettyWebApp(null, deployable, standAlone, targetPath, webApp);
+
+        EnvironmentType environmentType = jettyWebApp.getEnvironment();
+        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
+
+        if (webApp.getDistributableArray().length == 1) {
+            clusteringBuilders.buildEnvironment(jettyWebApp, environment);
+        }
+
+        idBuilder.resolve(environment, bundle.getSymbolicName(), "wab");
+
+        AbstractName moduleName;
+        if (earName == null) {
+            earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
+            moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.WEB_MODULE);
+        } else {
+            moduleName = naming.createChildName(earName, targetPath, NameFactory.WEB_MODULE);
+        }
+
+        // Create the AnnotatedApp interface for the WebModule
+        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
+
+        WebModule module = new WebModule(standAlone, moduleName, environment, deployable, targetPath, webApp, jettyWebApp, specDD, contextPath, JETTY_NAMESPACE, annotatedWebApp);
+        for (ModuleBuilderExtension mbe : moduleBuilderExtensions) {
+            mbe.createModule(module, bundle, naming, idBuilder);
+        }
+        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 {
         assert moduleFile != null : "moduleFile is null";
         assert targetPath != null : "targetPath is null";
@@ -273,15 +342,15 @@
             webApp = WebAppType.Factory.newInstance();
         }
 
+        Deployable deployable = new DeployableJarFile(moduleFile);
         // parse vendor dd
-        JettyWebAppType jettyWebApp = getJettyWebApp(plan, moduleFile, standAlone, targetPath, webApp);
+        JettyWebAppType jettyWebApp = getJettyWebApp(plan, deployable, standAlone, targetPath, webApp);
         contextRoot = getContextRoot(jettyWebApp, contextRoot, webApp, standAlone, moduleFile, targetPath);
 
         EnvironmentType environmentType = jettyWebApp.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
 
-        Boolean distributable = webApp.getDistributableArray().length == 1 ? TRUE : FALSE;
-        if (TRUE == distributable) {
+        if (webApp.getDistributableArray().length == 1) {
             clusteringBuilders.buildEnvironment(jettyWebApp, environment);
         }
 
@@ -303,8 +372,7 @@
         // Create the AnnotatedApp interface for the WebModule
         AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
 
-        WebModule module = new WebModule(standAlone, moduleName, environment, moduleFile, targetPath, webApp, jettyWebApp, specDD, contextRoot, JETTY_NAMESPACE, annotatedWebApp);
-
+        WebModule module = new WebModule(standAlone, moduleName, environment, deployable, targetPath, webApp, jettyWebApp, specDD, contextRoot, JETTY_NAMESPACE, annotatedWebApp);
         for (ModuleBuilderExtension mbe : moduleBuilderExtensions) {
             mbe.createModule(module, plan, moduleFile, targetPath, specDDUrl, environment, contextRoot, earName, naming, idBuilder);
         }
@@ -322,7 +390,7 @@
         return contextRoot;
     }
 
-    JettyWebAppType getJettyWebApp(Object plan, JarFile moduleFile, boolean standAlone, String targetPath, WebAppType webApp) throws DeploymentException {
+    JettyWebAppType getJettyWebApp(Object plan, Deployable deployable, boolean standAlone, String targetPath, WebAppType webApp) throws DeploymentException {
         XmlObject rawPlan = null;
         try {
             // load the geronimo-web.xml from either the supplied plan or from the earFile
@@ -333,17 +401,14 @@
                     if (plan != null) {
                         rawPlan = XmlBeansUtil.parse(((File) plan).toURL(), getClass().getClassLoader());
                     } else {
-                        URL path = JarUtils.createJarURL(moduleFile, "WEB-INF/geronimo-web.xml");
-                        try {
+                        URL path = deployable.getResource("WEB-INF/geronimo-web.xml");
+                        if (path == null) {
+                            path = deployable.getResource("WEB-INF/geronimo-jetty.xml");
+                        }
+                        if (path == null) {
+                            log.warn("Web application " + targetPath + " does not contain a WEB-INF/geronimo-web.xml deployment plan.  This may or may not be a problem, depending on whether you have things like resource references that need to be resolved.  You can also give the deployer a separate deployment plan file on the command line.");
+                        } else {
                             rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
-                        } catch (FileNotFoundException e) {
-                            path = JarUtils.createJarURL(moduleFile, "WEB-INF/geronimo-jetty.xml");
-                            try {
-                                rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
-                            } catch (FileNotFoundException e1) {
-                                log.warn(
-                                        "Web application " + targetPath + " does not contain a WEB-INF/geronimo-web.xml deployment plan.  This may or may not be a problem, depending on whether you have things like resource references that need to be resolved.  You can also give the deployer a separate deployment plan file on the command line.");
-                            }
                         }
                     }
                 }

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java (original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java Sat Jan 23 23:28:10 2010
@@ -26,6 +26,7 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.jar.JarFile;
 
+import org.apache.geronimo.deployment.DeployableJarFile;
 import org.apache.geronimo.deployment.service.GBeanBuilder;
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
@@ -159,7 +160,7 @@
         URL war = classLoader.getResource("deployables/war5");
         assertTrue(war != null);
         UnpackedJarFile moduleFile = new UnpackedJarFile(new File(war.getFile()));
-        JettyWebAppType jettyWebApp = builder.getJettyWebApp(null, moduleFile, true, null, null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(null, new DeployableJarFile(moduleFile), true, null, null);
         moduleFile.close();
         assertEquals(1, jettyWebApp.getResourceRefArray().length);
     }
@@ -168,7 +169,7 @@
         URL war = classLoader.getResource("deployables/war6.war");
         assertTrue(war != null);
         JarFile moduleFile = new JarFile(new File(war.getFile()));
-        JettyWebAppType jettyWebApp = builder.getJettyWebApp(null, moduleFile, true, null, null);
+        JettyWebAppType jettyWebApp = builder.getJettyWebApp(null, new DeployableJarFile(moduleFile), true, null, null);
         moduleFile.close();
         assertEquals(1, jettyWebApp.getResourceRefArray().length);
     }
@@ -212,7 +213,7 @@
         assertTrue(war != null);
         JarFile dummyFile = new JarFile(new File(war.getFile()));
 
-        webApp = builder.getJettyWebApp(webApp, dummyFile, true, null, null);
+        webApp = builder.getJettyWebApp(webApp, new DeployableJarFile(dummyFile), true, null, null);
 
         assertEquals("myContextRoot", webApp.getContextRoot());
 
@@ -223,7 +224,7 @@
         URL war = classLoader.getResource("deployables/war2.war");
         assertTrue(war != null);
         JarFile dummyFile = new JarFile(new File(war.getFile()));
-        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, true, null, null);
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, new DeployableJarFile(dummyFile), true, null, null);
         WebAppType webApp = getWebApp(dummyFile);
         String contextRoot = builder.getContextRoot(GerWebAppType, null, webApp, true, dummyFile, null);
 
@@ -236,7 +237,7 @@
         URL war = classLoader.getResource("deployables/war2.war");
         assertTrue(war != null);
         JarFile dummyFile = new JarFile(new File(war.getFile()));
-        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, false, "myTargetPath", null);
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, new DeployableJarFile(dummyFile), false, "myTargetPath", null);
         WebAppType webApp = getWebApp(dummyFile);
         String contextRoot = builder.getContextRoot(GerWebAppType, null, webApp, false, dummyFile, "myTargetPath");
         assertEquals("myTargetPath", contextRoot);
@@ -252,7 +253,7 @@
         URL war = classLoader.getResource("deployables/war2.war");
         assertTrue(war != null);
         JarFile dummyFile = new JarFile(new File(war.getFile()));
-        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, false, "myTargetPath", webAppType);
+        JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, new DeployableJarFile(dummyFile), false, "myTargetPath", webAppType);
 //        WebAppType webApp = getWebApp(dummyFile);
         String contextRoot = builder.getContextRoot(GerWebAppType, null, webAppType, false, dummyFile, "myTargetPath");
 

Modified: geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java (original)
+++ geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java Sat Jan 23 23:28:10 2010
@@ -93,6 +93,9 @@
         this.namingBuilders = namingBuilders;
     }
 
+    public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+    }
+    
     public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         if (!(module instanceof WebModule)) {
             //not a web module, nothing to do

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java (original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java Sat Jan 23 23:28:10 2010
@@ -201,6 +201,10 @@
         return EjbModuleBuilder.OPENEJBJAR_NAMESPACE;
     }
 
+    public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        return null;
+    }
+    
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         return createModule(plan, moduleFile, "ejb.jar", null, null, null, naming, idBuilder);
     }
@@ -520,7 +524,7 @@
         EARContext moduleContext = module.getEarContext();
         ModuleList moduleLocations = (ModuleList) module.getRootEarContext().getGeneralData().get(ModuleList.class);
         URI baseUri = URI.create(module.getTargetPath());
-        moduleContext.getCompleteManifestClassPath(module.getModuleFile(), baseUri, URI.create("."), manifestcp, moduleLocations);
+        moduleContext.getCompleteManifestClassPath(module.getDeployable(), baseUri, URI.create("."), manifestcp, moduleLocations);
         moduleContext.getGeneralData().put(ClassPathList.class, manifestcp);
 
         for (ModuleBuilderExtension builder : moduleBuilderExtensions) {

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-builder-wadi/src/main/java/org/apache/geronimo/openejb/deployment/cluster/WADIOpenEJBClusteringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-builder-wadi/src/main/java/org/apache/geronimo/openejb/deployment/cluster/WADIOpenEJBClusteringBuilder.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-builder-wadi/src/main/java/org/apache/geronimo/openejb/deployment/cluster/WADIOpenEJBClusteringBuilder.java (original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-builder-wadi/src/main/java/org/apache/geronimo/openejb/deployment/cluster/WADIOpenEJBClusteringBuilder.java Sat Jan 23 23:28:10 2010
@@ -208,6 +208,9 @@
         }
     }
 
+    public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+    }
+
     public void createModule(Module module,
         Object plan,
         JarFile moduleFile,

Modified: geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java (original)
+++ geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder/src/main/java/org/apache/geronimo/persistence/builder/PersistenceUnitBuilder.java Sat Jan 23 23:28:10 2010
@@ -87,6 +87,9 @@
         this.defaultPersistenceUnitProperties = defaultPersistenceUnitProperties == null ? new Properties() : defaultPersistenceUnitProperties;
     }
 
+    public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+    }
+
     public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
     }
 

Modified: geronimo/server/trunk/plugins/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/pom.xml?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/pom.xml (original)
+++ geronimo/server/trunk/plugins/pom.xml Sat Jan 23 23:28:10 2010
@@ -137,6 +137,7 @@
         <!--<module>procrun</module>-->
         <module>jetty8</module>
         <module>tomcat</module>
+        <module>wab</module>
     </modules>
 
     <profiles>

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=902507&r1=902506&r2=902507&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 Sat Jan 23 23:28:10 2010
@@ -34,6 +34,9 @@
 import javax.servlet.Servlet;
 
 import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.Deployable;
+import org.apache.geronimo.deployment.DeployableBundle;
+import org.apache.geronimo.deployment.DeployableJarFile;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
 import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
@@ -58,6 +61,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.util.JarUtils;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
@@ -159,6 +163,77 @@
         doStop();
     }
 
+    public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+        if (bundle == null) {
+            throw new NullPointerException("bundle is null");
+        }
+        String contextPath = (String) bundle.getHeaders().get("Web-ContextPath");
+        if (contextPath == null) {
+            // not for us
+            return null;
+        }
+        
+        String specDD = null;
+        WebAppType webApp = null;
+        Boolean isJavaee;
+        
+        URL specDDUrl = bundle.getEntry("WEB-INF/web.xml");
+        if (specDDUrl == null) {
+            webApp = WebAppType.Factory.newInstance();
+            isJavaee = true;
+        } else {
+            try {
+                specDD = JarUtils.readAll(specDDUrl);
+
+                XmlObject parsed = XmlBeansUtil.parse(specDD);
+                isJavaee = "http://java.sun.com/xml/ns/javaee".equals(getRootNamespace(parsed));
+                
+                WebAppDocument webAppDoc = convertToServletSchema(parsed);
+                webApp = webAppDoc.getWebApp();
+                check(webApp);
+            } catch (XmlException e) {
+                throw new DeploymentException("Error parsing web.xml for " + bundle.getSymbolicName(), e);
+            } catch (Exception e) {
+                throw new DeploymentException("Error reading web.xml for " + bundle.getSymbolicName(), e);
+            }
+        }
+        
+        AbstractName earName = null;
+        String targetPath = ".";   
+        boolean standAlone = true;
+        
+        Deployable deployable = new DeployableBundle(bundle);
+        // parse vendor dd
+        TomcatWebAppType tomcatWebApp = getTomcatWebApp(null, deployable, standAlone, targetPath, webApp);
+
+        EnvironmentType environmentType = tomcatWebApp.getEnvironment();
+        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
+
+        if (webApp.getDistributableArray().length == 1) {
+            clusteringBuilders.buildEnvironment(tomcatWebApp, environment);
+        }
+
+        idBuilder.resolve(environment, bundle.getSymbolicName(), "wab");
+        
+        AbstractName moduleName;
+        if (earName == null) {
+            earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
+            moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.WEB_MODULE);
+        } else {
+            moduleName = naming.createChildName(earName, targetPath, NameFactory.WEB_MODULE);
+        }
+
+        // Create the AnnotatedApp interface for the WebModule
+        AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
+
+        WebModule module = new WebModule(standAlone, moduleName, environment, deployable, targetPath, webApp, tomcatWebApp, specDD, contextPath, TOMCAT_NAMESPACE, annotatedWebApp);
+        for (ModuleBuilderExtension mbe : moduleBuilderExtensions) {
+            mbe.createModule(module, bundle, naming, idBuilder);
+        }
+        module.getSharedContext().put(IS_JAVAEE, isJavaee);
+        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 {
         assert moduleFile != null : "moduleFile is null";
         assert targetPath != null : "targetPath is null";
@@ -180,14 +255,8 @@
             // we found web.xml, if it won't parse that's an error.
             XmlObject parsed = XmlBeansUtil.parse(specDD);
             //Dont save updated xml if it isn't javaee
-            XmlCursor cursor = parsed.newCursor();
-            try {
-                cursor.toStartDoc();
-                cursor.toFirstChild();
-                isJavaee = "http://java.sun.com/xml/ns/javaee".equals(cursor.getName().getNamespaceURI());
-            } finally {
-                cursor.dispose();
-            }
+            isJavaee = "http://java.sun.com/xml/ns/javaee".equals(getRootNamespace(parsed));
+
             WebAppDocument webAppDoc = convertToServletSchema(parsed);
             webApp = webAppDoc.getWebApp();
             check(webApp);
@@ -205,41 +274,28 @@
             //else ignore as jee5 allows optional spec dd for .war's
         }
 
-        if (webApp == null)
+        if (webApp == null) {
             webApp = WebAppType.Factory.newInstance();
-
+        }
+        
+        Deployable deployable = new DeployableJarFile(moduleFile);
         // parse vendor dd
-        TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, moduleFile, standAlone, targetPath, webApp);
+        TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, deployable, standAlone, targetPath, webApp);
         contextRoot = getContextRoot(tomcatWebApp, contextRoot, webApp, standAlone, moduleFile, targetPath);
 
         EnvironmentType environmentType = tomcatWebApp.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
 
-        Boolean distributable = webApp.getDistributableArray().length == 1 ? TRUE : FALSE;
-        if (TRUE == distributable) {
+        if (webApp.getDistributableArray().length == 1) {
             clusteringBuilders.buildEnvironment(tomcatWebApp, environment);
         }
 
         // Note: logic elsewhere depends on the default artifact ID being the file name less extension (ConfigIDExtractor)
-        String warName = "";
-        File temp = new File(moduleFile.getName());
-        if (temp.isFile()) {
-            warName = temp.getName();
-            if (warName.lastIndexOf('.') > -1) {
-                warName = warName.substring(0, warName.lastIndexOf('.'));
-            }
-        } else {
-            try {
-                warName = temp.getCanonicalFile().getName();
-                if (warName.equals("")) {
-                    // Root directory
-                    warName = "$root-dir$";
-                }
-            } catch (IOException e) {
-                //really?
-            }
+        String warName = new File(moduleFile.getName()).getName();
+        if (warName.lastIndexOf('.') > -1) {
+            warName = warName.substring(0, warName.lastIndexOf('.'));
         }
-        idBuilder.resolve(environment, warName, "car");
+        idBuilder.resolve(environment, warName, "war");
 
         AbstractName moduleName;
         if (earName == null) {
@@ -252,7 +308,7 @@
         // Create the AnnotatedApp interface for the WebModule
         AnnotatedWebApp annotatedWebApp = new AnnotatedWebApp(webApp);
 
-        WebModule module = new WebModule(standAlone, moduleName, environment, moduleFile, targetPath, webApp, tomcatWebApp, specDD, contextRoot, TOMCAT_NAMESPACE, annotatedWebApp);
+        WebModule module = new WebModule(standAlone, moduleName, environment, deployable, targetPath, webApp, tomcatWebApp, specDD, contextRoot, TOMCAT_NAMESPACE, annotatedWebApp);
         for (ModuleBuilderExtension mbe : moduleBuilderExtensions) {
             mbe.createModule(module, plan, moduleFile, targetPath, specDDUrl, environment, contextRoot, earName, naming, idBuilder);
         }
@@ -260,6 +316,17 @@
         return module;
     }
 
+    private static String getRootNamespace(XmlObject object) {
+        XmlCursor cursor = object.newCursor();
+        try {
+            cursor.toStartDoc();
+            cursor.toFirstChild();
+            return cursor.getName().getNamespaceURI();
+        } finally {
+            cursor.dispose();
+        }
+    }
+    
     private String getContextRoot(TomcatWebAppType tomcatWebApp, String contextRoot, WebAppType webApp, boolean standAlone, JarFile moduleFile, String targetPath) {
         //If we have a context root, override everything
         if (tomcatWebApp.isSetContextRoot()) {
@@ -281,7 +348,7 @@
     }
 
 
-    TomcatWebAppType getTomcatWebApp(Object plan, JarFile moduleFile, boolean standAlone, String targetPath, WebAppType webApp) throws DeploymentException {
+    TomcatWebAppType getTomcatWebApp(Object plan, Deployable deployable, boolean standAlone, String targetPath, WebAppType webApp) throws DeploymentException {
         XmlObject rawPlan = null;
         try {
             // load the geronimo-web.xml from either the supplied plan or from the earFile
@@ -292,16 +359,14 @@
                     if (plan != null) {
                         rawPlan = XmlBeansUtil.parse(((File) plan).toURL(), getClass().getClassLoader());
                     } else {
-                        URL path = JarUtils.createJarURL(moduleFile, "WEB-INF/geronimo-web.xml");
-                        try {
+                        URL path = deployable.getResource("WEB-INF/geronimo-web.xml");
+                        if (path == null) {
+                            path = deployable.getResource("WEB-INF/geronimo-tomcat.xml");
+                        }
+                        if (plan == null) {
+                            log.warn("Web application " + targetPath + " does not contain a WEB-INF/geronimo-web.xml deployment plan.  This may or may not be a problem, depending on whether you have things like resource references that need to be resolved.  You can also give the deployer a separate deployment plan file on the command line.");                            
+                        } else {
                             rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
-                        } catch (FileNotFoundException e) {
-                            path = JarUtils.createJarURL(moduleFile, "WEB-INF/geronimo-tomcat.xml");
-                            try {
-                                rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
-                            } catch (FileNotFoundException e1) {
-                                log.warn("Web application " + targetPath + " does not contain a WEB-INF/geronimo-web.xml deployment plan.  This may or may not be a problem, depending on whether you have things like resource references that need to be resolved.  You can also give the deployer a separate deployment plan file on the command line.");
-                            }
                         }
                     }
                 }

Added: geronimo/server/trunk/plugins/wab/TODO
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/TODO?rev=902507&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/wab/TODO (added)
+++ geronimo/server/trunk/plugins/wab/TODO Sat Jan 23 23:28:10 2010
@@ -0,0 +1,7 @@
+TODO:
+ - extender needs to start tracking bundles only once kernel is fully initialized (all plugins are loaded)
+ - rfc66 contextpath collision detection
+ - for collision detection the extender will need to know all the contextPaths of other Java EE apps deployed
+ - register ServerContext into service registry (Tomcat & Jetty)
+ - extender needs to check/wait for web container to be available
+

Modified: geronimo/server/trunk/plugins/wab/geronimo-web-extender/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/geronimo-web-extender/pom.xml?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/wab/geronimo-web-extender/pom.xml (original)
+++ geronimo/server/trunk/plugins/wab/geronimo-web-extender/pom.xml Sat Jan 23 23:28:10 2010
@@ -50,6 +50,12 @@
             <groupId>org.ops4j.pax.logging</groupId>
             <artifactId>pax-logging-api</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-web-2.5-builder</artifactId>
+            <version>${version}</version>
+        </dependency>
     </dependencies>
 
     <build>
@@ -63,7 +69,9 @@
                             org.osgi.service.event;resolution:=optional,
                             *
                         </Import-Package>
+<!--
                         <Bundle-Activator>org.apache.geronimo.osgi.web.WebContainerExtender</Bundle-Activator>
+-->
                     </instructions>
                 </configuration>
             </plugin>

Modified: geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/WebApplication.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/WebApplication.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/WebApplication.java (original)
+++ geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/WebApplication.java Sat Jan 23 23:28:10 2010
@@ -18,8 +18,32 @@
  */
 package org.apache.geronimo.osgi.web;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import org.apache.geronimo.deployment.ModuleIDBuilder;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.j2ee.deployment.BundleDeploymentContext;
+import org.apache.geronimo.j2ee.deployment.EARContext;
+import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
+import org.apache.geronimo.j2ee.deployment.NamingBuilder;
+import org.apache.geronimo.j2ee.deployment.WebModule;
+import org.apache.geronimo.j2ee.jndi.ApplicationJndi;
+import org.apache.geronimo.j2ee.jndi.JndiKey;
+import org.apache.geronimo.j2ee.jndi.JndiScope;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.osgi.framework.Bundle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -44,6 +68,8 @@
     private final AtomicBoolean running = new AtomicBoolean();
     
     private boolean destroyed;
+    
+    private Artifact deployedArtifact;
 
     /**
      * Construct a WebApplicationImp object to represent a
@@ -56,7 +82,7 @@
     public WebApplication(WebContainerExtender extender, Bundle bundle, String contextPath) {
         this.extender = extender;
         this.bundle = bundle;
-        this.contextPath = contextPath;
+        this.contextPath = contextPath;       
     }
 
     public String getContextPath() {
@@ -101,22 +127,18 @@
     }
 
     private void deploying() {
-        LOGGER.debug("Deploying bundle {}", getBundle().getSymbolicName());
         extender.getEventDispatcher().deploying(bundle, contextPath);
     }
 
     private void deployed() {
-        LOGGER.debug("Deployed bundle {}", getBundle().getSymbolicName());
         extender.getEventDispatcher().deployed(bundle, contextPath);
     }
 
     private void undeploying() {
-        LOGGER.debug("Undeploying bundle {}", bundle.getSymbolicName());
         extender.getEventDispatcher().undeploying(bundle, contextPath);
     }
 
     private void undeployed() {
-        LOGGER.debug("Undeployed bundle {}", bundle.getSymbolicName());
         extender.getEventDispatcher().undeployed(bundle, contextPath);
     }
 
@@ -131,12 +153,90 @@
         if (destroyed) {
             return;
         }
+        ConfigurationData configurationData = null;
         try {
             // send out a broadcast alert that we're going to do this
             deploying();
+                       
+            ConfigurationManager configurationManager = extender.getConfigurationManager();
+                        
+            File configSer = bundle.getBundleContext().getDataFile("config.ser");
+            if (configSer.exists() && configSer.lastModified() == bundle.getLastModified()) {
+                LOGGER.info("Redeploying WAB {} at {}", new Object[] {bundle, contextPath});
+                
+                FileInputStream in = new FileInputStream(configSer);
+                try {
+                    configurationData = ConfigurationUtil.readConfigurationData(in);
+                } finally {
+                    in.close();
+                }
+            } else {
+                LOGGER.info("Deploying WAB {} at {}", new Object[] {bundle, contextPath});
+                
+                ModuleIDBuilder idBuilder = new ModuleIDBuilder();
+                Kernel kernel = extender.getKernel();
+                Naming naming = kernel.getNaming();
+                ModuleBuilder webModuleBuilder = extender.getWebModuleBuilder();    
+                
+                WebModule webModule = (WebModule) webModuleBuilder.createModule(bundle, naming, idBuilder);
+
+                BundleDeploymentContext deploymentContext = 
+                    new BundleDeploymentContext(
+                        webModule.getEnvironment(),
+                        webModule.getType(),
+                        naming,
+                        configurationManager,
+                        bundle.getBundleContext(),
+                        extender.getServerName(),
+                        webModule.getModuleName(),
+                        extender.getTransactionManagerObjectName(),
+                        extender.getConnectionTrackerObjectName(),
+                        extender.getCorbaGBeanObjectName(),
+                        new HashMap(),
+                        bundle);
+                webModule.setEarContext(deploymentContext);
+                webModule.setRootEarContext(deploymentContext);
+
+                deploymentContext.flush();
+                deploymentContext.initializeConfiguration();
+
+                webModuleBuilder.initContext(deploymentContext, webModule, bundle);
+                
+                AbstractName appJndiName = naming.createChildName(deploymentContext.getModuleName(), "ApplicationJndi", "ApplicationJndi");
+                deploymentContext.getGeneralData().put(EARContext.APPLICATION_JNDI_NAME_KEY, appJndiName);
+                
+                webModuleBuilder.addGBeans(deploymentContext, webModule, bundle, extender.getRepositories());     
+
+                Map<JndiKey, Map<String, Object>> contexts = NamingBuilder.JNDI_KEY.get(deploymentContext.getGeneralData());
+                GBeanData appContexts = new GBeanData(appJndiName, ApplicationJndi.class);
+                appContexts.setAttribute("globalContextSegment", contexts.get(JndiScope.global));
+                appContexts.setAttribute("applicationContextMap", contexts.get(JndiScope.application));
+                appContexts.setReferencePattern("GlobalContext", extender.getGlobalContextAbstractName());
+                deploymentContext.addGBean(appContexts);
+                
+                configurationData = deploymentContext.getConfigurationData();
+                FileOutputStream out = new FileOutputStream(configSer);
+                try {
+                    ConfigurationUtil.writeConfigurationData(configurationData, out);
+                } finally {
+                    out.close();
+                }
+
+                deploymentContext.close();
+
+                // set config.ser last modified time to be of the bundle
+                configSer.setLastModified(bundle.getLastModified());
+            }
+            
+            configurationData.setUseEnvironment(true);    
+            configurationData.setBundleContext(bundle.getBundleContext());
+            
+            configurationManager.loadConfiguration(configurationData);
+            configurationManager.startConfiguration(configurationData.getId());
 
-            // TODO: do actual deployment
-            System.out.println("Deploying " + contextPath + " " + bundle);
+            deployedArtifact = configurationData.getId();
+            
+            LOGGER.info("Deployed WAB {} at {}", new Object[] {bundle, contextPath});
             
             // send out the deployed event
             deployed();
@@ -144,11 +244,26 @@
             LOGGER.error("Unable to start web application for bundle " + getBundle().getSymbolicName(), exception);
             // broadcast a failure event
             failed(exception);
+            // undeploy the configuration (in case it was loaded but failed to start)
+            if (configurationData != null) {
+                undeploy(configurationData.getId());
+            }
             // unregister the application and possibly let other WABs with the same ContextPath to deploy
             extender.unregisterWebApplication(this);
         }
     }
-
+    
+    private void undeploy(Artifact artifact) {
+        ConfigurationManager configurationManager = extender.getConfigurationManager();
+        try {
+            configurationManager.uninstallConfiguration(artifact);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (NoSuchConfigException e) {
+            // ignore
+        }
+    }
+    
     /**
      * Undeploy a web application.
      */
@@ -168,9 +283,12 @@
         // send the undeploying event
         undeploying();
         
-        // TODO: do actual undeployment
-        System.out.println("Undeploying " + contextPath + " " + bundle);
-
+        if (deployedArtifact != null) {
+            LOGGER.info("Undeploying WAB {} at {}", new Object[] {bundle, contextPath});
+            undeploy(deployedArtifact);
+            LOGGER.info("Undeployed WAB {} at {}", new Object[] {bundle, contextPath});
+        }
+        
         // finished with the undeploy operation
         undeployed();
         

Modified: geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/WebContainerExtender.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/WebContainerExtender.java?rev=902507&r1=902506&r2=902507&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/WebContainerExtender.java (original)
+++ geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/WebContainerExtender.java Sat Jan 23 23:28:10 2010
@@ -19,12 +19,27 @@
 package org.apache.geronimo.osgi.web;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.gbean.SingleElementCollection;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
+import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.repository.Repository;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
@@ -41,17 +56,88 @@
  * 
  * @version $Rev$, $Date$
  */
-public class WebContainerExtender implements BundleActivator {
+public class WebContainerExtender implements GBeanLifecycle {
     // the header that identifies a bundle as being a WAB
     public final static String WEB_CONTEXT_PATH_HEADER = "Web-ContextPath";
 
     private static final Logger LOGGER = LoggerFactory.getLogger(WebContainerExtender.class);
 
+    private final Kernel kernel;
+    private final BundleContext bundleContext;
+    private final Environment defaultEnvironment;
+    private final AbstractNameQuery serverName;
+    private final AbstractNameQuery transactionManagerObjectName;
+    private final AbstractNameQuery connectionTrackerObjectName;
+    private final AbstractNameQuery corbaGBeanObjectName;
+    private final AbstractNameQuery globalContextAbstractName;
+    private final SingleElementCollection<ModuleBuilder> webConfigBuilder;
+    private final Collection<? extends Repository> repositories;
+    private final ConfigurationManager configurationManager;
+    
     private Map<String, WebApplication> contextPathMap;
     private WebContainerEventDispatcher eventDispatcher;
     private BundleTracker bt;
     private ExecutorService executor;
+    
+    public WebContainerExtender(@ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment,
+                                @ParamAttribute(name = "transactionManagerAbstractName") AbstractNameQuery transactionManagerAbstractName,
+                                @ParamAttribute(name = "connectionTrackerAbstractName") AbstractNameQuery connectionTrackerAbstractName,
+                                @ParamAttribute(name = "corbaGBeanAbstractName") AbstractNameQuery corbaGBeanAbstractName,
+                                @ParamAttribute(name = "globalContextAbstractName") AbstractNameQuery globalContextAbstractName,
+                                @ParamAttribute(name = "serverName") AbstractNameQuery serverName,
+                                @ParamReference(name = "Repositories", namingType = "Repository") Collection<? extends Repository> repositories,
+                                @ParamReference(name = "WebModuleBuilders", namingType = NameFactory.MODULE_BUILDER) Collection<ModuleBuilder> webModuleBuilders,
+                                @ParamSpecial(type = SpecialAttributeType.kernel) Kernel kernel,
+                                @ParamSpecial(type = SpecialAttributeType.bundleContext) BundleContext bundleContext) throws Exception {
+        this.defaultEnvironment = defaultEnvironment;
+        this.transactionManagerObjectName = transactionManagerAbstractName;
+        this.connectionTrackerObjectName = connectionTrackerAbstractName;
+        this.corbaGBeanObjectName = corbaGBeanAbstractName;
+        this.globalContextAbstractName = globalContextAbstractName;
+        this.serverName = serverName;
+        this.repositories = repositories;
+        this.webConfigBuilder = new SingleElementCollection<ModuleBuilder>(webModuleBuilders);
+        this.bundleContext = bundleContext;
+        this.kernel = kernel;   
+        this.configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
+    }
+
+    AbstractNameQuery getServerName() {
+        return serverName;
+    }
+
+    AbstractNameQuery getTransactionManagerObjectName() {
+        return transactionManagerObjectName;
+    }
 
+    AbstractNameQuery getConnectionTrackerObjectName() {
+        return connectionTrackerObjectName;
+    }
+
+    AbstractNameQuery getCorbaGBeanObjectName() {
+        return corbaGBeanObjectName;
+    }
+
+    AbstractNameQuery getGlobalContextAbstractName() {
+        return globalContextAbstractName;
+    }
+    
+    Collection<? extends Repository> getRepositories() {
+        return repositories;
+    }
+    
+    Kernel getKernel() {
+        return kernel;
+    }
+    
+    ConfigurationManager getConfigurationManager() {
+        return configurationManager;
+    }
+    
+    ModuleBuilder getWebModuleBuilder() {
+        return webConfigBuilder.getElement();
+    }
+    
     /**
      * Activate the bundle and initialize the extender instance.
      *
@@ -178,4 +264,16 @@
     protected synchronized void unregisterWebApplication(WebApplication webApp) {
         contextPathMap.remove(webApp.getContextPath());
     }
+
+    public void doFail() {
+        stop(bundleContext);  
+    }
+
+    public void doStart() throws Exception {
+        start(bundleContext);
+    }
+
+    public void doStop() throws Exception {
+        stop(bundleContext);        
+    }
 }



Mime
View raw message