geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r993185 [1/2] - in /geronimo/server/trunk: framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/con...
Date Tue, 07 Sep 2010 00:34:47 GMT
Author: djencks
Date: Tue Sep  7 00:34:46 2010
New Revision: 993185

URL: http://svn.apache.org/viewvc?rev=993185&view=rev
Log:
GERONIMO-5567 rewrite jetty integration to use a openejb-like info tree and the *Registration interfaces.  This gets everything started in the right order and is a lot simpler.  Old code still needs to be removed

Added:
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/DefaultWebAppInfoFactory.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/StandardWebAppInfoFactory.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoFactory.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/utils/WebAppXmlAttributeBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/assembler/
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/assembler/Assembler.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterInfo.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterMappingInfo.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/MultipartConfigInfo.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ServletInfo.java
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java
    geronimo/server/trunk/plugins/j2ee/javaee-builder-support/
      - copied from r991050, geronimo/server/trunk/plugins/j2ee/j2ee-deployer/
Modified:
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/GBeanBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/SingleGBeanBuilder.java
    geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/XmlAttributeBuilder.java
    geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/css/CSSConfigEditor.java
    geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/tss/TSSConfigEditor.java
    geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/test/java/org/apache/geronimo/corba/security/config/tss/TSSConfigEditorTest.java
    geronimo/server/trunk/plugins/corba/geronimo-yoko/src/test/java/org/apache/geronimo/yoko/TSSConfigEditorTest.java
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/WebModule.java
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java
    geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java
    geronimo/server/trunk/plugins/j2ee/j2ee-server/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/j2ee/javaee-builder-support/pom.xml
    geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/j2ee/pom.xml
    geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilderTest.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/test/java/org/apache/geronimo/jetty8/deployment/PlanParsingTest.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java
    geronimo/server/trunk/plugins/jetty8/jetty8-deployer/pom.xml
    geronimo/server/trunk/plugins/jetty8/jetty8-deployer/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java Tue Sep  7 00:34:46 2010
@@ -285,7 +285,7 @@ public class EnvironmentBuilder extends 
         return NAMESPACE;
     }
 
-    public Object getValue(XmlObject xmlObject, String type, Bundle bundle) throws DeploymentException {
+    public Object getValue(XmlObject xmlObject, XmlObject enclosing, String type, Bundle bundle) throws DeploymentException {
 
         EnvironmentType environmentType;
         if (xmlObject instanceof EnvironmentType) {
@@ -321,7 +321,7 @@ public class EnvironmentBuilder extends 
         try {
             EnvironmentDocument environmentDocument = EnvironmentDocument.Factory.parse(text);
             EnvironmentType environmentType = environmentDocument.getEnvironment();
-            Environment environment = (Environment) getValue(environmentType, null, null);
+            Environment environment = (Environment) getValue(environmentType, null, null, null);
             setValue(environment);
 
         } catch (XmlException e) {

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/GBeanBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/GBeanBuilder.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/GBeanBuilder.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/GBeanBuilder.java Tue Sep  7 00:34:46 2010
@@ -133,7 +133,7 @@ public class GBeanBuilder implements Nam
                 if (anys.length != 1) {
                     throw new DeploymentException("Unexpected count of xs:any elements in xml-attribute " + anys.length + " qnameset: " + XmlAttributeType.type.qnameSetForWildcardElements());
                 }
-                builder.setXmlAttribute(name, anys[0]);
+                builder.setXmlAttribute(name, anys[0], xmlAttributeType);
             }
         }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeBuilder.java Tue Sep  7 00:34:46 2010
@@ -45,7 +45,7 @@ public class JavaBeanXmlAttributeBuilder
         return NAMESPACE;
     }
 
-    public Object getValue(XmlObject xmlObject, String type, Bundle bundle) throws DeploymentException {
+    public Object getValue(XmlObject xmlObject, XmlObject enclosing, String type, Bundle bundle) throws DeploymentException {
         JavabeanType javabean = (JavabeanType) xmlObject.copy().changeType(JavabeanType.type);
         return internalGetValue(javabean, type, bundle);
     }
@@ -125,7 +125,7 @@ public class JavaBeanXmlAttributeBuilder
                 PropertyDescriptor propertyDescriptor = propertyDescriptors[j];
                 if (propertyName.equals(propertyDescriptor.getName())) {
                     String propertyType = propertyDescriptor.getPropertyType().getName();
-                    Object value = getValue(innerBean, propertyType, bundle);
+                    Object value = getValue(innerBean, beanProperty, propertyType, bundle);
                     Method m = propertyDescriptor.getWriteMethod();
                     try {
                         m.invoke(instance, new Object[] {value});

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java Tue Sep  7 00:34:46 2010
@@ -81,7 +81,7 @@ public class JavaBeanXmlAttributeEditor 
             JavabeanType javaBeanType = document.getJavabean();
             
             Object javabean = xmlAttributeBuilder.getValue(javaBeanType,
-                javaBeanClazz.getName(),
+                    document, javaBeanClazz.getName(),
                 bundle);
 
             setValue(javabean);

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/SingleGBeanBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/SingleGBeanBuilder.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/SingleGBeanBuilder.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/SingleGBeanBuilder.java Tue Sep  7 00:34:46 2010
@@ -92,7 +92,7 @@ public class SingleGBeanBuilder {
         }
     }
 
-    public void setXmlAttribute(String name, XmlObject xmlObject) throws DeploymentException {
+    public void setXmlAttribute(String name, XmlObject xmlObject, XmlObject enclosing) throws DeploymentException {
         String namespace = xmlObject.getDomNode().getNamespaceURI();
         XmlAttributeBuilder builder = (XmlAttributeBuilder) xmlAttributeBuilderMap.get(namespace);
         if (builder == null) {
@@ -103,7 +103,7 @@ public class SingleGBeanBuilder {
             throw new DeploymentException("Unknown attribute " + name + " on " + gbean.getAbstractName());
         }
         String type = attribute.getType();
-        Object value = builder.getValue(xmlObject, type, bundle);
+        Object value = builder.getValue(xmlObject, enclosing, type, bundle);
         gbean.setAttribute(name, value);
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/XmlAttributeBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/XmlAttributeBuilder.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/XmlAttributeBuilder.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/XmlAttributeBuilder.java Tue Sep  7 00:34:46 2010
@@ -27,6 +27,6 @@ public interface XmlAttributeBuilder {
 
     String getNamespace();
 
-    Object getValue(XmlObject xmlObject, String type, Bundle bundle) throws DeploymentException;
+    Object getValue(XmlObject xmlObject, XmlObject enclosing, String type, Bundle bundle) throws DeploymentException;
 
 }

Modified: geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/css/CSSConfigEditor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/css/CSSConfigEditor.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/css/CSSConfigEditor.java (original)
+++ geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/css/CSSConfigEditor.java Tue Sep  7 00:34:46 2010
@@ -78,7 +78,7 @@ public class CSSConfigEditor implements 
     }
 
     @Override
-    public Object getValue(XmlObject xmlObject, String type, Bundle bundle) throws DeploymentException {
+    public Object getValue(XmlObject xmlObject, XmlObject enclosing, String type, Bundle bundle) throws DeploymentException {
 
         CSSCssType css;
         if (xmlObject instanceof CSSCssType) {

Modified: geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/tss/TSSConfigEditor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/tss/TSSConfigEditor.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/tss/TSSConfigEditor.java (original)
+++ geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/main/java/org/apache/geronimo/corba/deployment/security/config/tss/TSSConfigEditor.java Tue Sep  7 00:34:46 2010
@@ -90,7 +90,7 @@ public class TSSConfigEditor implements 
      *          An IOException occured.
      */
     @Override
-    public Object getValue(XmlObject xmlObject, String type, Bundle bundle) throws DeploymentException {
+    public Object getValue(XmlObject xmlObject, XmlObject enclosing, String type, Bundle bundle) throws DeploymentException {
         TSSTssType tss;
         if (xmlObject instanceof TSSTssType) {
             tss = (TSSTssType) xmlObject;

Modified: geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/test/java/org/apache/geronimo/corba/security/config/tss/TSSConfigEditorTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/test/java/org/apache/geronimo/corba/security/config/tss/TSSConfigEditorTest.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/test/java/org/apache/geronimo/corba/security/config/tss/TSSConfigEditorTest.java (original)
+++ geronimo/server/trunk/plugins/corba/geronimo-corba-builder/src/test/java/org/apache/geronimo/corba/security/config/tss/TSSConfigEditorTest.java Tue Sep  7 00:34:46 2010
@@ -67,7 +67,7 @@ public class TSSConfigEditorTest extends
     public void testSimple1() throws Exception {
         XmlObject xmlObject = getXmlObject(TEST_XML1);
         TSSConfigEditor editor = new TSSConfigEditor();
-        Object o = editor.getValue(xmlObject, null, null);
+        Object o = editor.getValue(xmlObject, null, null, null);
         TSSConfig tss = (TSSConfig) o;
         assertFalse(tss.isInherit());
         assertNotNull(tss.getTransport_mech());
@@ -76,7 +76,7 @@ public class TSSConfigEditorTest extends
     public void testSimple2() throws Exception {
         XmlObject xmlObject = getXmlObject(TEST_XML2);
         TSSConfigEditor editor = new TSSConfigEditor();
-        TSSConfig tss = (TSSConfig) editor.getValue(xmlObject, null, null);
+        TSSConfig tss = (TSSConfig) editor.getValue(xmlObject, null, null, null);
         assertTrue(tss.isInherit());
         assertNotNull(tss.getTransport_mech());
         assertTrue(tss.getTransport_mech() instanceof TSSNULLTransportConfig);
@@ -86,7 +86,7 @@ public class TSSConfigEditorTest extends
         try {
             XmlObject xmlObject = getXmlObject(TEST_XML3);
             TSSConfigEditor editor = new TSSConfigEditor();
-            TSSConfig tss = (TSSConfig) editor.getValue(xmlObject, null, null);
+            TSSConfig tss = (TSSConfig) editor.getValue(xmlObject, null, null, null);
             fail("Should fail");
         } catch (DeploymentException e) {
         }

Modified: geronimo/server/trunk/plugins/corba/geronimo-yoko/src/test/java/org/apache/geronimo/yoko/TSSConfigEditorTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-yoko/src/test/java/org/apache/geronimo/yoko/TSSConfigEditorTest.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-yoko/src/test/java/org/apache/geronimo/yoko/TSSConfigEditorTest.java (original)
+++ geronimo/server/trunk/plugins/corba/geronimo-yoko/src/test/java/org/apache/geronimo/yoko/TSSConfigEditorTest.java Tue Sep  7 00:34:46 2010
@@ -73,7 +73,7 @@ public class TSSConfigEditorTest extends
         CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, getClass().getClassLoader(), null, null);
         XmlObject xmlObject = getXmlObject(TEST_XML4);
         TSSConfigEditor editor = new TSSConfigEditor();
-        Object o = editor.getValue(xmlObject, null, bundle);
+        Object o = editor.getValue(xmlObject, null, null, bundle);
         TSSConfig tss = (TSSConfig) o;
 
         corbaBean.setTssConfig(tss);

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=993185&r1=993184&r2=993185&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 Tue Sep  7 00:34:46 2010
@@ -34,6 +34,7 @@ import org.apache.xmlbeans.XmlObject;
 public class WebModule extends Module<WebApp, XmlObject> {
     private final String contextRoot;
     public static final String WEB_APP_DATA = "WEB_APP_DATA";
+    public static final String WEB_APP_INFO = "WEB_APP_INFO";
 
     public WebModule(boolean standAlone,
                      AbstractName moduleName,

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/CredentialStoreBuilder.java Tue Sep  7 00:34:46 2010
@@ -46,7 +46,7 @@ public class CredentialStoreBuilder impl
         return NAMESPACE;
     }
 
-    public Object getValue(XmlObject xmlObject, String type, Bundle bundle) throws DeploymentException {
+    public Object getValue(XmlObject xmlObject, XmlObject enclosing, String type, Bundle bundle) throws DeploymentException {
         Map<String, Map<String, Map<String, String>>> credentialStore = new HashMap<String, Map<String, Map<String, String>>>();
         CredentialStoreType cst = (CredentialStoreType) xmlObject.copy().changeType(CredentialStoreType.type);
         for (RealmType realmType: cst.getRealmArray()) {

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java Tue Sep  7 00:34:46 2010
@@ -183,7 +183,7 @@ public class LoginConfigBuilder implemen
                             if (builder == null) {
                                 throw new DeploymentException("No attribute builder deployed for namespace: " + namespace);
                             }
-                            Object value = builder.getValue(xmlObject, null, bundle);
+                            Object value = builder.getValue(anys[0], xmlOptionType, null, bundle);
                             options.put(key, value);
                         }
                     }

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/DefaultWebAppInfoFactory.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/DefaultWebAppInfoFactory.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/DefaultWebAppInfoFactory.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/DefaultWebAppInfoFactory.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web25.deployment;
+
+import org.apache.geronimo.web.info.FilterInfo;
+import org.apache.geronimo.web.info.ServletInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class DefaultWebAppInfoFactory implements WebAppInfoFactory{
+    @Override
+    public WebAppInfo newWebAppInfo() {
+        return new WebAppInfo();
+    }
+
+    @Override
+    public FilterInfo newFilterInfo() {
+        return new FilterInfo();
+    }
+
+    @Override
+    public ServletInfo newServletInfo() {
+        return new ServletInfo();
+    }
+
+    @Override
+    public void complete(WebAppInfo webAppInfo) {
+    }
+
+    @Override
+    public ServletInfo newJspInfo(String jspFile) {
+        throw new IllegalStateException("default does not support jsps");
+    }
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/StandardWebAppInfoFactory.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/StandardWebAppInfoFactory.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/StandardWebAppInfoFactory.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/StandardWebAppInfoFactory.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web25.deployment;
+
+import java.util.ArrayList;
+
+import org.apache.geronimo.web.info.FilterInfo;
+import org.apache.geronimo.web.info.ServletInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class StandardWebAppInfoFactory extends DefaultWebAppInfoFactory {
+
+    private final ServletInfo jspServletInfo;
+    private final WebAppInfo defaultWebAppInfo;
+
+    public StandardWebAppInfoFactory(WebAppInfo defaultWebAppInfo, ServletInfo jspServletInfo) {
+        this.defaultWebAppInfo = defaultWebAppInfo;
+        this.jspServletInfo = jspServletInfo;
+    }
+
+    @Override
+    public void complete(WebAppInfo webAppInfo) {
+        for (ServletInfo servletInfo: defaultWebAppInfo.servlets) {
+            webAppInfo.servlets.add(copy(servletInfo));
+        }
+        for (FilterInfo filterInfo: defaultWebAppInfo.filters) {
+            webAppInfo.filters.add(copy(filterInfo));
+        }
+        webAppInfo.listeners.addAll(defaultWebAppInfo.listeners);
+        webAppInfo.contextParams.putAll(defaultWebAppInfo.contextParams);
+        webAppInfo.contextRoot = defaultWebAppInfo.contextRoot;
+    }
+
+    @Override
+    public ServletInfo newJspInfo(String jspFile) {
+        ServletInfo servletInfo = copy(jspServletInfo);
+        servletInfo.initParams.put("jspFile", jspFile);
+        return servletInfo;
+    }
+
+    protected ServletInfo copy(ServletInfo servletInfo) {
+        ServletInfo copy = new ServletInfo();
+        copy.servletClass = servletInfo.servletClass;
+        copy.servletMappings.addAll(servletInfo.servletMappings);
+        copy.servletName = servletInfo.servletName;
+        copy.asyncSupported = servletInfo.asyncSupported;
+        copy.initParams.putAll(servletInfo.initParams);
+        copy.loadOnStartup = servletInfo.loadOnStartup;
+        copy.runAsRole = servletInfo.runAsRole;
+        return copy;
+    }
+
+    protected FilterInfo copy(FilterInfo filterInfo) {
+        FilterInfo copy = new FilterInfo();
+        copy.filterName = filterInfo.filterName;
+        copy.filterClass = filterInfo.filterClass;
+        copy.servletMappings.addAll(filterInfo.servletMappings);
+        copy.urlMappings.addAll(filterInfo.urlMappings);
+        copy.asyncSupported = filterInfo.asyncSupported;
+        copy.initParams.putAll(filterInfo.initParams);
+        return copy;
+    }
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.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/WebAppInfoBuilder.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoBuilder.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web25.deployment;
+
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.DispatcherType;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.web.info.FilterInfo;
+import org.apache.geronimo.web.info.FilterMappingInfo;
+import org.apache.geronimo.web.info.MultipartConfigInfo;
+import org.apache.geronimo.web.info.ServletInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
+import org.apache.openejb.jee.Dispatcher;
+import org.apache.openejb.jee.Filter;
+import org.apache.openejb.jee.FilterMapping;
+import org.apache.openejb.jee.Listener;
+import org.apache.openejb.jee.MultipartConfig;
+import org.apache.openejb.jee.ParamValue;
+import org.apache.openejb.jee.Servlet;
+import org.apache.openejb.jee.ServletMapping;
+import org.apache.openejb.jee.WebApp;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class WebAppInfoBuilder {
+
+    private final WebApp webApp;
+    private final WebAppInfoFactory webAppInfoFactory;
+
+    public WebAppInfoBuilder(WebApp webApp, WebAppInfoFactory webAppInfoFactory) {
+        this.webApp = webApp;
+        this.webAppInfoFactory = webAppInfoFactory;
+    }
+
+    public WebAppInfo build() throws DeploymentException {
+        List<String> problems = new ArrayList<String>();
+        WebAppInfo webAppInfo = webAppInfoFactory.newWebAppInfo();
+        addParams(webApp.getContextParam(), webAppInfo.contextParams);
+        webAppInfo.contextRoot = webApp.getContextRoot();
+
+        for (Listener listener: webApp.getListener()) {
+            webAppInfo.listeners.add(listener.getListenerClass());
+        }
+
+        Map<String, ServletInfo> servletMap = new HashMap<String, ServletInfo>();
+        for (Servlet servlet: webApp.getServlet()) {
+            ServletInfo servletInfo;
+            if (servlet.getServletClass() != null) {
+                servletInfo = webAppInfoFactory.newServletInfo();
+                servletInfo.servletClass = servlet.getServletClass();
+            } else if (servlet.getJspFile() != null) {
+                servletInfo = webAppInfoFactory.newJspInfo(servlet.getJspFile());
+            } else {
+                problems.add("\nNo servlet class or jsp file for servlet " + servlet.getServletName());
+                continue;
+            }
+            servletInfo.servletName = servlet.getServletName();
+            if (servlet.getAsyncSupported() != null) {
+                servletInfo.asyncSupported = servlet.getAsyncSupported();
+            }
+            servletInfo.loadOnStartup = servlet.getLoadOnStartup();
+            if (servlet.getRunAs() != null) {
+                servletInfo.runAsRole = servlet.getRunAs().getRoleName();
+            }
+            if (servlet.getMultipartConfig() != null) {
+                MultipartConfig multipartConfig = servlet.getMultipartConfig();
+                MultipartConfigInfo multipartConfigInfo = new MultipartConfigInfo();
+                multipartConfigInfo.location = multipartConfig.getLocation();
+                multipartConfigInfo.maxFileSize = multipartConfig.getMaxFileSize();
+                multipartConfigInfo.maxRequestSize = multipartConfig.getMaxRequestSize();
+                multipartConfigInfo.fileSizeThreshold = multipartConfig.getFileSizeThreshold();
+                servletInfo.multipartConfigInfo = multipartConfigInfo;
+            }
+            addParams(servlet.getInitParam(), servletInfo.initParams);
+            webAppInfo.servlets.add(servletInfo);
+            servletMap.put(servletInfo.servletName, servletInfo);
+        }
+        for (ServletMapping servletMapping: webApp.getServletMapping()) {
+            String servletName = servletMapping.getServletName();
+            ServletInfo servletInfo = servletMap.get(servletName);
+            if (servletInfo == null) {
+                problems.add("\nNo servlet matching servlet mappings for " + servletName);
+            } else {
+                normalizeUrlPatterns(servletMapping.getUrlPattern(), servletInfo.servletMappings);
+            }
+        }
+
+        Map<String, FilterInfo> filterMap = new HashMap<String, FilterInfo>();
+        for (Filter filter: webApp.getFilter()) {
+            FilterInfo filterInfo = webAppInfoFactory.newFilterInfo();
+            filterInfo.filterName = filter.getFilterName();
+            filterInfo.filterClass = filter.getFilterClass();
+            filterInfo.asyncSupported = filter.isAsyncSupported();
+            addParams(filter.getInitParam(), filterInfo.initParams);
+            webAppInfo.filters.add(filterInfo);
+            filterMap.put(filterInfo.filterName, filterInfo);
+        }
+        for (FilterMapping filterMapping: webApp.getFilterMapping()) {
+            String filterName = filterMapping.getFilterName();
+            FilterInfo filterInfo = filterMap.get(filterName);
+            if (filterInfo == null) {
+                problems.add("\nNo filter matching filter mappings for " + filterName);
+            } else {
+                if (!filterMapping.getServletName().isEmpty()) {
+                    FilterMappingInfo servletMapping = new FilterMappingInfo();
+                    servletMapping.dispatchers = toEnumSet(filterMapping.getDispatcher());
+                    servletMapping.mapping.addAll(filterMapping.getServletName());
+                    filterInfo.servletMappings.add(servletMapping);
+                }
+                if (!filterMapping.getUrlPattern().isEmpty()) {
+                    FilterMappingInfo urlMapping = new FilterMappingInfo();
+                    urlMapping.dispatchers = toEnumSet(filterMapping.getDispatcher());
+                    normalizeUrlPatterns(filterMapping.getUrlPattern(), urlMapping.mapping);
+                    filterInfo.urlMappings.add(urlMapping);
+                }
+            }
+        }
+
+        webAppInfoFactory.complete(webAppInfo);
+
+        if (!problems.isEmpty()) {
+            throw new DeploymentException("Problems encountered parsing web.xml: " + problems);
+        }
+        return webAppInfo;
+    }
+
+    public static void normalizeUrlPatterns(List<String> source, List<String> target) {
+        for (String pattern: source) {
+            pattern = pattern.trim();
+            if (!pattern.startsWith("*") && !pattern.startsWith("/")) {
+                pattern = "/" + pattern;
+                //log.info("corrected url pattern to " + pattern);
+            }
+            target.add(pattern);
+        }
+    }
+
+    protected void addParams(List<ParamValue> params, Map<String, String> paramMap) {
+        for (ParamValue paramValue: params) {
+            if (!paramMap.containsKey(paramValue.getParamName())) {
+                paramMap.put(paramValue.getParamName(), paramValue.getParamValue());
+            }
+        }
+    }
+
+    private EnumSet<DispatcherType> toEnumSet(List<Dispatcher> dispatchers) {
+        if (dispatchers.isEmpty()) {
+            return EnumSet.of(DispatcherType.REQUEST);
+        }
+        List<DispatcherType> types = new ArrayList<DispatcherType>(dispatchers.size());
+        for (Dispatcher dispatcher: dispatchers) {
+            types.add(toDispatcherType(dispatcher));
+        }
+        return EnumSet.copyOf(types);
+    }
+
+    private DispatcherType toDispatcherType(Dispatcher dispatcher) {
+        return DispatcherType.valueOf(dispatcher.name());
+    }
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoFactory.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/WebAppInfoFactory.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoFactory.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/WebAppInfoFactory.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web25.deployment;
+
+import org.apache.geronimo.web.info.FilterInfo;
+import org.apache.geronimo.web.info.ServletInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public interface WebAppInfoFactory {
+
+    WebAppInfo newWebAppInfo();
+    FilterInfo newFilterInfo();
+    ServletInfo newServletInfo();
+
+    void complete(WebAppInfo webAppInfo);
+
+    ServletInfo newJspInfo(String jspFile);
+
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/utils/WebAppXmlAttributeBuilder.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/utils/WebAppXmlAttributeBuilder.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/utils/WebAppXmlAttributeBuilder.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/utils/WebAppXmlAttributeBuilder.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web25.deployment.utils;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.ValidationEvent;
+import javax.xml.bind.ValidationEventHandler;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.service.XmlAttributeBuilder;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.web25.deployment.DefaultWebAppInfoFactory;
+import org.apache.geronimo.web25.deployment.WebAppInfoBuilder;
+import org.apache.openejb.jee.JAXBContextFactory;
+import org.apache.openejb.jee.Servlet;
+import org.apache.openejb.jee.WebApp;
+import org.apache.xmlbeans.XmlObject;
+import org.osgi.framework.Bundle;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+
+@GBean(j2eeType = "XmlAttributeBuilder")
+public class WebAppXmlAttributeBuilder implements XmlAttributeBuilder {
+
+    @Override
+    public String getNamespace() {
+        return "http://java.sun.com/xml/ns/javaee";
+    }
+
+    @Override
+    public Object getValue(XmlObject xmlObject, XmlObject enclosing, String s, Bundle bundle) throws DeploymentException {
+        try {
+            XMLStreamReader reader = enclosing.newXMLStreamReader();
+            while (reader.hasNext() && reader.next() != 1);
+            if (s.endsWith("WebAppInfo")) {
+                WebApp webApp = (WebApp) unmarshalJavaee(WebApp.class, reader);
+                return new WebAppInfoBuilder(webApp, new DefaultWebAppInfoFactory()).build();
+            }
+            throw new DeploymentException("Unrecognized xml: " + enclosing.xmlText());
+        } catch (XMLStreamException e) {
+            throw new DeploymentException("xml problem", e);
+        }
+    }
+
+    public static <T>Object unmarshalJavaee(Class<T> type, XMLStreamReader in) throws DeploymentException {
+
+        try {
+            JAXBContext ctx = JAXBContextFactory.newInstance(type);
+            Unmarshaller unmarshaller = ctx.createUnmarshaller();
+            unmarshaller.setEventHandler(new ValidationEventHandler(){
+                public boolean handleEvent(ValidationEvent validationEvent) {
+                    System.out.println(validationEvent);
+                    return false;
+                }
+            });
+
+
+            JAXBElement<T> element = unmarshaller.unmarshal(in, type);
+            return element.getValue();
+        } catch (JAXBException e) {
+            throw new DeploymentException("parsing problem", e);
+        }
+    }
+
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/assembler/Assembler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/assembler/Assembler.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/assembler/Assembler.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/assembler/Assembler.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web.assembler;
+
+import java.util.Map;
+
+import javax.servlet.FilterRegistration;
+import javax.servlet.MultipartConfigElement;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRegistration;
+import org.apache.geronimo.web.info.FilterInfo;
+import org.apache.geronimo.web.info.FilterMappingInfo;
+import org.apache.geronimo.web.info.ServletInfo;
+import org.apache.geronimo.web.info.WebAppInfo;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class Assembler {
+
+    public void assemble(ServletContext servletContext, WebAppInfo webAppInfo) {
+        for (Map.Entry<String, String> entry: webAppInfo.contextParams.entrySet()) {
+            servletContext.setInitParameter(entry.getKey(), entry.getValue());
+        }
+        for (ServletInfo servletInfo: webAppInfo.servlets) {
+            addServlet(servletContext, servletInfo);
+        }
+        for (FilterInfo filterInfo: webAppInfo.filters) {
+            addFilter(servletContext, filterInfo);
+        }
+        for (String listener: webAppInfo.listeners) {
+            addListener(servletContext, listener);
+        }
+//        servletContext.declareRoles();
+//        servletContext.setSessionTrackingModes();
+    }
+
+    private void addListener(ServletContext servletContext, String listener) {
+        servletContext.addListener(listener);
+    }
+
+    private FilterRegistration.Dynamic addFilter(ServletContext servletContext, FilterInfo filterInfo) {
+        FilterRegistration.Dynamic filterRegistration = servletContext.addFilter(filterInfo.filterName, filterInfo.filterClass);
+        filterRegistration.setAsyncSupported(filterInfo.asyncSupported);
+        filterRegistration.setInitParameters(filterInfo.initParams);
+        for (FilterMappingInfo servletMapping: filterInfo.servletMappings) {
+            filterRegistration.addMappingForServletNames(servletMapping.dispatchers, true, servletMapping.mapping.toArray(new String[servletMapping.mapping.size()]));
+        }
+        for (FilterMappingInfo urlMapping: filterInfo.urlMappings) {
+            filterRegistration.addMappingForUrlPatterns(urlMapping.dispatchers, true, urlMapping.mapping.toArray(new String[urlMapping.mapping.size()]));
+        }
+        return filterRegistration;
+    }
+
+    protected ServletRegistration.Dynamic addServlet(ServletContext servletContext, ServletInfo servletInfo) {
+        ServletRegistration.Dynamic servletRegistration = servletContext.addServlet(servletInfo.servletName, servletInfo.servletClass);
+        servletRegistration.setInitParameters(servletInfo.initParams);
+        servletRegistration.setAsyncSupported(servletInfo.asyncSupported);
+        if (servletInfo.loadOnStartup != null) {
+            servletRegistration.setLoadOnStartup(servletInfo.loadOnStartup);
+        }
+        if (servletInfo.multipartConfigInfo != null) {
+            servletRegistration.setMultipartConfig(new MultipartConfigElement(servletInfo.multipartConfigInfo.location,
+                    servletInfo.multipartConfigInfo.maxFileSize,
+                    servletInfo.multipartConfigInfo.maxRequestSize,
+                    servletInfo.multipartConfigInfo.fileSizeThreshold));
+        }
+        servletRegistration.setRunAsRole(servletInfo.runAsRole);
+//        servletRegistration.setServletSecurity();
+        servletRegistration.addMapping(servletInfo.servletMappings.toArray(new String[servletInfo.servletMappings.size()]));
+        return servletRegistration;
+    }
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterInfo.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterInfo.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterInfo.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web.info;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class FilterInfo implements Serializable {
+
+    public String filterName;
+    public String filterClass;
+    public boolean asyncSupported;
+    public final List<FilterMappingInfo> urlMappings = new ArrayList<FilterMappingInfo>();
+    public final List<FilterMappingInfo> servletMappings = new ArrayList<FilterMappingInfo>();
+    public final Map<String, String> initParams = new HashMap<String, String>();
+    
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterMappingInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterMappingInfo.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterMappingInfo.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/FilterMappingInfo.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web.info;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.List;
+
+import javax.servlet.DispatcherType;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class FilterMappingInfo implements Serializable {
+
+    public EnumSet<DispatcherType> dispatchers;
+    public final List<String> mapping = new ArrayList<String>();
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/MultipartConfigInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/MultipartConfigInfo.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/MultipartConfigInfo.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/MultipartConfigInfo.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web.info;
+
+import java.io.Serializable;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class MultipartConfigInfo implements Serializable {
+
+    public String location;
+    public long maxFileSize;
+    public long maxRequestSize;
+    public int fileSizeThreshold;
+
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ServletInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ServletInfo.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ServletInfo.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/ServletInfo.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web.info;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class ServletInfo implements Serializable {
+
+    public String servletName;
+    public String servletClass;
+    public final Map<String, String> initParams = new HashMap<String, String>();
+    public boolean asyncSupported;
+    public List<String> servletMappings = new ArrayList<String>();
+    public Integer loadOnStartup;
+    public String runAsRole;
+    public MultipartConfigInfo multipartConfigInfo;
+
+}

Added: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java?rev=993185&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java (added)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/info/WebAppInfo.java Tue Sep  7 00:34:46 2010
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.web.info;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class WebAppInfo implements Serializable {
+
+    public String contextRoot;
+    public final List<FilterInfo> filters = new ArrayList<FilterInfo>();
+    public final List<ServletInfo> servlets = new ArrayList<ServletInfo>();
+    public final List<String> listeners = new ArrayList<String>();
+    public final Map<String, String> contextParams = new HashMap<String, String>();
+    
+}

Modified: geronimo/server/trunk/plugins/j2ee/j2ee-server/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/j2ee-server/src/main/history/dependencies.xml?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/j2ee-server/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/j2ee-server/src/main/history/dependencies.xml Tue Sep  7 00:34:46 2010
@@ -27,8 +27,33 @@
         <type>jar</type>
     </dependency>
     <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-osgi-registry</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
         <groupId>org.apache.servicemix.bundles</groupId>
         <artifactId>org.apache.servicemix.bundles.howl</artifactId>
         <type>jar</type>
     </dependency>
+    <dependency>
+        <groupId>org.apache.servicemix.bundles</groupId>
+        <artifactId>org.apache.servicemix.bundles.xpp3</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean-bundleutils</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean-finder</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean-reflect</artifactId>
+        <type>jar</type>
+    </dependency>
 </plugin-artifact>

Modified: geronimo/server/trunk/plugins/j2ee/javaee-builder-support/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/javaee-builder-support/pom.xml?rev=993185&r1=991050&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/javaee-builder-support/pom.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/javaee-builder-support/pom.xml Tue Sep  7 00:34:46 2010
@@ -29,12 +29,12 @@
     </parent>
     
     <groupId>org.apache.geronimo.configs</groupId>
-    <artifactId>j2ee-deployer</artifactId>
-    <name>Geronimo Plugins, J2EE :: Deployer</name>
+    <artifactId>javaee-builder-support</artifactId>
+    <name>Geronimo Plugins, JavaEE :: Builder Support</name>
     <packaging>car</packaging>
 
     <description>
-        Basic JavaEE deployer functionality including the ear deployer.
+        XMLAttributeBuilder for default javaee descriptors as builder attributes
     </description>
 
     <dependencies>
@@ -45,26 +45,6 @@
             <type>car</type>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>j2ee-server</artifactId>
-            <version>${project.version}</version>
-            <type>car</type>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.framework</groupId>
-            <artifactId>server-security-config</artifactId>
-            <version>${project.version}</version>
-            <type>car</type>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-j2ee-schema</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
         <!--<dependency>-->
             <!--<groupId>org.apache.geronimo.schema</groupId>-->
             <!--<artifactId>geronimo-schema-javaee_6</artifactId>-->
@@ -86,17 +66,11 @@
             <!--<version>${project.version}</version>-->
         <!--</dependency>-->
 
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-naming-builder</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-j2ee-builder</artifactId>
-            <version>${project.version}</version>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.modules</groupId>-->
+            <!--<artifactId>geronimo-naming-builder</artifactId>-->
+            <!--<version>${project.version}</version>-->
+        <!--</dependency>-->
 
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
@@ -104,100 +78,54 @@
             <version>${project.version}</version>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-test-ddbean</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.modules</groupId>-->
+            <!--<artifactId>geronimo-web-2.5-builder</artifactId>-->
+            <!--<version>${project.version}</version>-->
+        <!--</dependency>-->
 
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-security-builder</artifactId>
-            <version>${project.version}</version>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.modules</groupId>-->
+            <!--<artifactId>geronimo-test-ddbean</artifactId>-->
+            <!--<version>${project.version}</version>-->
+            <!--<scope>test</scope>-->
+        <!--</dependency>-->
 
-        <dependency>
-            <groupId>org.apache.xbean</groupId>
-            <artifactId>xbean-finder</artifactId>
-        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.modules</groupId>-->
+            <!--<artifactId>geronimo-security-builder</artifactId>-->
+            <!--<version>${project.version}</version>-->
+        <!--</dependency>-->
+
+        <!--<dependency>-->
+            <!--<groupId>org.apache.xbean</groupId>-->
+            <!--<artifactId>xbean-finder</artifactId>-->
+        <!--</dependency>-->
     </dependencies>
 
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/resources/schema</outputDirectory>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.geronimo.modules</groupId>
-                                    <artifactId>geronimo-j2ee-builder</artifactId>
-                                    <version>${project.version}</version>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.apache.geronimo.modules</groupId>
-                                    <artifactId>geronimo-naming-builder</artifactId>
-                                    <version>${project.version}</version>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.apache.geronimo.modules</groupId>
-                                    <artifactId>geronimo-security-builder</artifactId>
-                                    <version>${project.version}</version>
-                                </artifactItem>
-                            </artifactItems>
-                            <includes>**/*.xsd</includes>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.geronimo.buildsupport</groupId>
                 <artifactId>car-maven-plugin</artifactId>
                 <configuration>
                     <category>JavaEE deployment</category>
-                    <dependencies>
-                        <dependency>
-                            <groupId>org.apache.geronimo.configs</groupId>
-                            <artifactId>j2ee-server</artifactId>
-                            <type>car</type>
-                            <import>classes</import>
-                        </dependency>
-                        <dependency>
-                            <groupId>org.apache.geronimo.framework</groupId>
-                            <artifactId>server-security-config</artifactId>
-                            <type>car</type>
-                            <import>classes</import>
-                        </dependency>
-                    </dependencies>
+                    <!--<dependencies>-->
+                        <!--<dependency>-->
+                            <!--<groupId>org.apache.geronimo.configs</groupId>-->
+                            <!--<artifactId>j2ee-server</artifactId>-->
+                            <!--<type>car</type>-->
+                            <!--<import>classes</import>-->
+                        <!--</dependency>-->
+                        <!--<dependency>-->
+                            <!--<groupId>org.apache.geronimo.framework</groupId>-->
+                            <!--<artifactId>server-security-config</artifactId>-->
+                            <!--<type>car</type>-->
+                            <!--<import>classes</import>-->
+                        <!--</dependency>-->
+                    <!--</dependencies>-->
 
                     <instance>
-                        <plugin-artifact>
-                            <config-xml-content>
-                                <gbean name="WebBuilder">
-                                    <attribute name="defaultNamespace">http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0</attribute>
-                                </gbean>
-                                <gbean name="EnvironmentEntryBuilder">
-                                    <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
-                                </gbean>
-                            </config-xml-content>
-                            <config-xml-content server="offline">
-                                <gbean name="WebBuilder">
-                                    <attribute name="defaultNamespace">http://geronimo.apache.org/xml/ns/j2ee/web/jetty-2.0</attribute>
-                                </gbean>
-                                <gbean name="EnvironmentEntryBuilder">
-                                    <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
-                                </gbean>
-                            </config-xml-content>
-                            <copy-file dest-dir="schema">schema/schemaorg_apache_xmlbeans/src/</copy-file>
-                        </plugin-artifact>
                     </instance>
                 </configuration>
             </plugin>

Modified: geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/history/dependencies.xml?rev=993185&r1=991050&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/history/dependencies.xml Tue Sep  7 00:34:46 2010
@@ -2,14 +2,19 @@
 <plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
     <module-id>
         <groupId>org.apache.geronimo.configs</groupId>
-        <artifactId>j2ee-deployer</artifactId>
+        <artifactId>javaee-builder-support</artifactId>
         <version>3.0-SNAPSHOT</version>
         <type>car</type>
     </module-id>
     <dependency>
-        <groupId>org.apache.geronimo.configs</groupId>
-        <artifactId>j2ee-server</artifactId>
-        <type>car</type>
+        <groupId>org.apache.geronimo.components</groupId>
+        <artifactId>geronimo-jaspi</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.components</groupId>
+        <artifactId>geronimo-transaction</artifactId>
+        <type>jar</type>
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
@@ -23,8 +28,13 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.framework</groupId>
-        <artifactId>server-security-config</artifactId>
-        <type>car</type>
+        <artifactId>geronimo-security</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.modules</groupId>
+        <artifactId>geronimo-j2ee</artifactId>
+        <type>jar</type>
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.modules</groupId>
@@ -63,6 +73,21 @@
     </dependency>
     <dependency>
         <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-j2ee-connector_1.6_spec</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-jacc_1.4_spec</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-jaspic_1.0_spec</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
         <artifactId>geronimo-jaxws_2.2_spec</artifactId>
         <type>jar</type>
     </dependency>
@@ -72,11 +97,26 @@
         <type>jar</type>
     </dependency>
     <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-jta_1.1_spec</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-osgi-locator</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
         <groupId>org.apache.openejb</groupId>
         <artifactId>openejb-jee</artifactId>
         <type>jar</type>
     </dependency>
     <dependency>
+        <groupId>org.apache.servicemix.bundles</groupId>
+        <artifactId>org.apache.servicemix.bundles.howl</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
         <groupId>org.apache.xbean</groupId>
         <artifactId>xbean-bundleutils</artifactId>
         <type>jar</type>

Modified: geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/plan/plan.xml?rev=993185&r1=991050&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/javaee-builder-support/src/main/plan/plan.xml Tue Sep  7 00:34:46 2010
@@ -20,160 +20,6 @@
 
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
-    <gbean name="EARBuilder" class="org.apache.geronimo.j2ee.deployment.EARConfigBuilder">
-        <attribute name="transactionManagerAbstractName">?name=TransactionManager</attribute>
-        <attribute name="connectionTrackerAbstractName">?name=ConnectionTracker</attribute>
-        <attribute name="globalContextAbstractName">?name=JavaGlobalContext</attribute>
-        <attribute name="corbaGBeanAbstractName">?name=Server</attribute>
-        <attribute name="serverName">?j2eeType=J2EEServer#org.apache.geronimo.management.geronimo.J2EEServer</attribute>
-        <reference name="Repositories">
-            <!--<gbean-name>*:name=Repository,*</gbean-name>-->
-        </reference>
-        <reference name="WebConfigBuilder">
-            <name>WebBuilder</name>
-        </reference>
-        <references name="ServiceBuilders">
-            <pattern>
-                <name>GBeanBuilder</name>
-            </pattern>
-            <pattern>
-                <name>SecurityBuilder</name>
-            </pattern>
-        </references>
-        <references name="PersistenceUnitBuilders">
-            <pattern>
-                <name>PersistenceUnitBuilder</name>
-            </pattern>
-        </references>
-        <references name="EJBConfigBuilder">
-            <pattern>
-                <name>EJBBuilder</name>
-            </pattern>
-            <pattern>
-                <name>UnavailableEJBBuilder</name>
-            </pattern>
-        </references>
-        <reference name="ConnectorConfigBuilder">
-            <name>ConnectorBuilder</name>
-        </reference>
-        <references name="AppClientConfigBuilder">
-            <pattern>
-                <name>AppClientBuilder</name>
-            </pattern>
-            <pattern>
-                <name>UnavailableAppClientBuilder</name>
-            </pattern>
-        </references>
-        <reference name="NamingBuilders">
-            <name>NamingBuilders</name>
-        </reference>
-        <reference name="ArtifactResolvers">
-            <name>ArtifactResolver</name>
-        </reference>
-        <xml-attribute name="defaultEnvironment">
-            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
-                <dependencies>
-                    <dependency>
-                        <groupId>${pom.groupId}</groupId>
-                        <artifactId>j2ee-server</artifactId>
-                        <type>car</type>
-                    </dependency>
-                </dependencies>
-            </environment>
-        </xml-attribute>
-    </gbean>
-
-    <!-- web switching builder -->
-    <gbean name="WebBuilder" class="org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder">
-        <attribute name="defaultNamespace">http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-${geronimoSchemaVersion}</attribute>
-        <references name="ModuleBuilders">
-            <pattern>
-                <name>JettyWebBuilder</name>
-            </pattern>
-            <pattern>
-                <name>TomcatWebBuilder</name>
-            </pattern>
-        </references>
-    </gbean>
-
-    <!--<gbean name="SecurityBuilder" class="org.apache.geronimo.security.deployment.rbac.RbacSecurityBuilder">-->
-        <!--<attribute name="credentialStoreName">?name=CredentialStore#</attribute>-->
-        <!--<attribute name="defaultSystemRbacName">?name=SystemRbac#</attribute>-->
-    <!--</gbean>-->
-
-    <gbean name="SecurityBuilder" class="org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl">
-        <attribute name="credentialStoreName">?name=CredentialStore#</attribute>
-    </gbean>
-
-    <gbean name="LoginConfigurationBuilder" class="org.apache.geronimo.security.deployment.LoginConfigBuilder"/>
-
-    <gbean name="CredentialStoreBuilder" class="org.apache.geronimo.security.deployment.CredentialStoreBuilder"/>
-
-    <gbean name="NamingBuilders" class="org.apache.geronimo.j2ee.deployment.NamingBuilderCollection">
-        <references name="NamingBuilders">
-            <pattern>
-                <name>GBeanRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>PersistenceRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>DataSourceBuilder</name>
-            </pattern>
-            <pattern>
-                <name>ResourceRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>AdminObjectRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>EnvironmentEntryBuilder</name>
-            </pattern>
-            <pattern>
-                <name>SwitchingServiceRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>EjbRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>OpenEjbCorbaRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>CorbaRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>LifecycleMethodBuilder</name>
-            </pattern>
-            <pattern>
-                <name>ManagedResourceRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>BValNamingBuilder</name>
-            </pattern>
-        </references>
-    </gbean>
-
-    <gbean name="GBeanRefBuilder" class="org.apache.geronimo.naming.deployment.GBeanRefBuilder"/>
-    <gbean name="EnvironmentEntryBuilder" class="org.apache.geronimo.naming.deployment.EnvironmentEntryBuilder">
-        <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
-    </gbean>
-
-    <gbean name="SwitchingServiceRefBuilder" class="org.apache.geronimo.naming.deployment.SwitchingServiceRefBuilder">
-        <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
-        <references name="JAXRPCBuilder">
-            <pattern>
-                <name>AxisServiceRefBuilder</name>
-            </pattern>
-        </references>
-        <references name="JAXWSBuilder">
-            <pattern>
-                <name>CXFServiceRefBuilder</name>
-            </pattern>
-            <pattern>
-                <name>Axis2ServiceRefBuilder</name>
-            </pattern>
-        </references>
-    </gbean>
-    <gbean name="LifecycleMethodBuilder" class="org.apache.geronimo.naming.deployment.LifecycleMethodBuilder"/>
+    <gbean name="WebAppXmlAttributeBuilder" class="org.apache.geronimo.web25.deployment.utils.WebAppXmlAttributeBuilder"/>
 
 </module>

Modified: geronimo/server/trunk/plugins/j2ee/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/pom.xml?rev=993185&r1=993184&r2=993185&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/pom.xml (original)
+++ geronimo/server/trunk/plugins/j2ee/pom.xml Tue Sep  7 00:34:46 2010
@@ -37,6 +37,7 @@
     <modules>
         <module>geronimo-j2ee</module>
         <module>geronimo-j2ee-builder</module>
+        <module>javaee-builder-support</module>
         <module>j2ee-deployer</module>
         <module>geronimo-j2ee-schema</module>
         <module>geronimo-naming-builder</module>

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=993185&r1=993184&r2=993185&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 Tue Sep  7 00:34:46 2010
@@ -58,6 +58,7 @@ import org.apache.geronimo.kernel.GBeanA
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder;
 import org.apache.openejb.jee.JaxbJavaee;
 import org.apache.openejb.jee.JspConfig;
@@ -127,14 +128,6 @@ public class JspModuleBuilderExtension i
 
         EARContext moduleContext = module.getEarContext();
         Map sharedContext = module.getSharedContext();
-        GBeanData jspServletData = AbstractWebModuleBuilder.DEFAULT_JSP_SERVLET_KEY.get(sharedContext);
-        if (jspServletData != null) {
-            try {
-                moduleContext.addGBean(jspServletData);
-            } catch (GBeanAlreadyExistsException e) {
-                throw new DeploymentException("jsp servlet already present", e);
-            }
-        }
 
         GBeanData webAppData = (GBeanData) sharedContext.get(WebModule.WEB_APP_DATA);
 
@@ -151,7 +144,9 @@ public class JspModuleBuilderExtension i
 
         Set<String> listenerNames = new HashSet<String>();
 
-        ClassFinder classFinder = createJspClassFinder(webApp, webModule, listenerNames);
+        Collection<URL> urls = getTldFiles(webApp, webModule);
+        LinkedHashSet<Class> classes = getListenerClasses(webApp, webModule, urls, listenerNames);
+        ClassFinder classFinder = new ClassFinder(new ArrayList<Class>(classes));
         webModule.setClassFinder(classFinder);
 
         namingBuilders.buildNaming(webApp, jettyWebApp, webModule, buildingContext);
@@ -172,17 +167,25 @@ public class JspModuleBuilderExtension i
 
             webAppData.setReferencePattern("ContextCustomizer", jspLifecycleName);
         }
-        // add listeners
-        Object value = webAppData.getAttribute("listenerClassNames");
-        if (value instanceof Collection) {
-            ((Collection<String>) value).addAll(listenerNames);
-        }
-    }
 
-    protected ClassFinder createJspClassFinder(WebApp webApp, WebModule webModule, Set<String> listenerNames) throws DeploymentException {
-        Collection<URL> urls = getTldFiles(webApp, webModule);
-        LinkedHashSet<Class> classes = getListenerClasses(webApp, webModule, urls, listenerNames);
-        return new ClassFinder(new ArrayList<Class>(classes));
+        WebAppInfo webAppInfo = (WebAppInfo)sharedContext.get(WebModule.WEB_APP_INFO);
+        if (webAppInfo != null) {
+            webAppInfo.listeners.addAll(listenerNames);
+        } else {
+            GBeanData jspServletData = AbstractWebModuleBuilder.DEFAULT_JSP_SERVLET_KEY.get(sharedContext);
+            if (jspServletData != null) {
+                try {
+                    moduleContext.addGBean(jspServletData);
+                } catch (GBeanAlreadyExistsException e) {
+                    throw new DeploymentException("jsp servlet already present", e);
+                }
+            }
+            // add listeners
+            Object value = webAppData.getAttribute("listenerClassNames");
+            if (value instanceof Collection) {
+                ((Collection<String>) value).addAll(listenerNames);
+            }
+        }
     }
 
 



Mime
View raw message