geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r449137 - in /geronimo/sandbox/javaee5: assemblies-jee5/geronimo-jetty6-jee5/src/main/var/config/ configs-jee5/jetty6-deployer/ configs-jee5/jetty6-deployer/src/plan/ modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/je...
Date Sat, 23 Sep 2006 01:01:26 GMT
Author: djencks
Date: Fri Sep 22 18:01:25 2006
New Revision: 449137

URL: http://svn.apache.org/viewvc?view=rev&rev=449137
Log:
GERONIMO-2427.  Make ref builders accept either j2ee 1.4 or jee5 deployment descriptor xml

Added:
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/MockResourceEnvironmentSetter.java
  (with props)
Modified:
    geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/src/main/var/config/config.xml
    geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/pom.xml
    geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/src/plan/plan.xml
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java

Modified: geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/src/main/var/config/config.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/src/main/var/config/config.xml?view=diff&rev=449137&r1=449136&r2=449137
==============================================================================
--- geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/src/main/var/config/config.xml
(original)
+++ geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/src/main/var/config/config.xml
Fri Sep 22 18:01:25 2006
@@ -106,12 +106,33 @@
         </gbean>
     </module>
     
-    <module name="org.apache.geronimo.configs/connector-deployer/${pom.version}/car"/>
+    <module name="org.apache.geronimo.configs/connector-deployer/${pom.version}/car">
+        <gbean name="ResourceRefBuilder">
+            <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
+        </gbean>
+
+        <gbean name="AdminObjectRefBuilder">
+            <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
+        </gbean>
+
+    </module>
 
     <module name="org.apache.geronimo.configs/openejb-deployer/${pom.version}/car">
         <gbean name="EJBBuilder">
             <attribute name="listener">?name=JettyWebContainer</attribute>
         </gbean>
+        <gbean name="OpenEjbRemoteRefBuilder">
+            <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
+        </gbean>
+
+        <gbean name="OpenEjbClientRemoteRefBuilder">
+            <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
+        </gbean>
+
+        <gbean name="OpenEjbLocalRefBuilder">
+            <attribute name="eeNamespaces">http://java.sun.com/xml/ns/j2ee,http://java.sun.com/xml/ns/javaee</attribute>
+        </gbean>
+
     </module>
     
     <module name="org.apache.geronimo.configs/client-deployer/${pom.version}/car"/>

Modified: geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/pom.xml?view=diff&rev=449137&r1=449136&r2=449137
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/pom.xml (original)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/pom.xml Fri Sep 22 18:01:25 2006
@@ -40,7 +40,14 @@
             <version>${pom.version}</version>
             <type>car</type>
         </dependency>
-        
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>connector-deployer</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </dependency>
+
         <!-- similar thing not needed in tomcat !!! -->
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>

Modified: geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/src/plan/plan.xml?view=diff&rev=449137&r1=449136&r2=449137
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/src/plan/plan.xml (original)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-deployer/src/plan/plan.xml Fri Sep 22 18:01:25
2006
@@ -54,14 +54,12 @@
         <reference name="ClusteringBuilders">
             <name>JettyClusteringBuilder</name>
         </reference>
+        <reference name="ResourceEnvironmentSetter">
+            <name>ResourceRefBuilder</name>
+        </reference>
         <xml-attribute name="defaultEnvironment">
             <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
                 <dependencies>
-                    <!--<dependency>-->
-                        <!--<groupId>${pom.groupId}</groupId>-->
-                        <!--<artifactId>j2ee-server</artifactId>-->
-                        <!--<type>car</type>-->
-                    <!--</dependency>-->
                     <dependency>
                         <groupId>${pom.groupId}</groupId>
                         <artifactId>jetty</artifactId>

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java?view=diff&rev=449137&r1=449136&r2=449137
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
Fri Sep 22 18:01:25 2006
@@ -83,6 +83,7 @@
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
+import org.apache.geronimo.naming.deployment.ResourceEnvironmentSetter;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
@@ -151,8 +152,9 @@
             Collection securityBuilders,
             Collection serviceBuilders,
             NamingBuilder namingBuilders,
+            ResourceEnvironmentSetter resourceEnvironmentSetter,
             Kernel kernel) throws GBeanNotFoundException {
-        super(kernel, securityBuilders, serviceBuilders, namingBuilders);
+        super(kernel, securityBuilders, serviceBuilders, namingBuilders, resourceEnvironmentSetter);
         this.defaultEnvironment = defaultEnvironment;
         this.defaultSessionTimeoutSeconds = (defaultSessionTimeoutSeconds == null) ? new
Integer(30 * 60) : defaultSessionTimeoutSeconds;
         this.jettyContainerObjectName = jettyContainerName;
@@ -368,7 +370,7 @@
             GBeanResourceEnvironmentBuilder rebuilder = new GBeanResourceEnvironmentBuilder(webModuleData);
             //N.B. use earContext not moduleContext
             //TODO fix this for javaee 5 !!!
-//            ENCConfigBuilder.setResourceEnvironment(rebuilder, webApp.getResourceRefArray(),
jettyWebApp.getResourceRefArray());
+            resourceEnvironmentSetter.setResourceEnvironment(rebuilder, webApp.getResourceRefArray(),
jettyWebApp.getResourceRefArray());
 
             webModuleData.setAttribute("contextPath", webModule.getContextRoot());
 
@@ -1032,6 +1034,7 @@
         infoBuilder.addReference("SecurityBuilders", NamespaceDrivenBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addReference("ServiceBuilders", NamespaceDrivenBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addReference("NamingBuilders", NamingBuilder.class, NameFactory.MODULE_BUILDER);
+        infoBuilder.addReference("ResourceEnvironmentSetter", ResourceEnvironmentSetter.class,
NameFactory.MODULE_BUILDER);
         infoBuilder.addAttribute("kernel", Kernel.class, false);
         infoBuilder.addInterface(ModuleBuilder.class);
 
@@ -1049,6 +1052,7 @@
                 "SecurityBuilders",
                 "ServiceBuilders",
                 "NamingBuilders",
+                "ResourceEnvironmentSetter",
                 "kernel"});
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java?view=diff&rev=449137&r1=449136&r2=449137
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilderTest.java
Fri Sep 22 18:01:25 2006
@@ -208,7 +208,7 @@
     protected void setUp() throws Exception {
         super.setUp();
 
-        ((SchemaTypeImpl)GerSecurityDocument.type).addSubstitutionGroupMember(org.apache.geronimo.xbeans.geronimo.security.GerSecurityDocument.type.getDocumentElementName());
+        ((SchemaTypeImpl) GerSecurityDocument.type).addSubstitutionGroupMember(org.apache.geronimo.xbeans.geronimo.security.GerSecurityDocument.type.getDocumentElementName());
 
         cl = this.getClass().getClassLoader();
         kernel = KernelFactory.newInstance().createKernel("test");
@@ -266,19 +266,20 @@
         defaultEnvironment.addDependency(baseId, ImportType.ALL);
         defaultEnvironment.setConfigId(webModuleArtifact);
         builder = new JettyModuleBuilder(defaultEnvironment,
-                         new Integer(1800),
-                         Collections.EMPTY_LIST,
-                         new AbstractNameQuery(containerName),
-                         defaultServlets,
-                         defaultFilters,
-                         defaultFilterMappings,
-                         pojoWebServiceTemplate,
-                         Collections.singleton(webServiceBuilder),
-                         null,
-                         Collections.singleton(new GeronimoSecurityBuilderImpl()),
-                         Collections.singleton(new GBeanBuilder(null, null)),
-                         new NamingBuilderCollection(null, null), 
-                         kernel);
+                new Integer(1800),
+                Collections.EMPTY_LIST,
+                new AbstractNameQuery(containerName),
+                defaultServlets,
+                defaultFilters,
+                defaultFilterMappings,
+                pojoWebServiceTemplate,
+                Collections.singleton(webServiceBuilder),
+                null,
+                Collections.singleton(new GeronimoSecurityBuilderImpl()),
+                Collections.singleton(new GBeanBuilder(null, null)),
+                new NamingBuilderCollection(null, null),
+                new MockResourceEnvironmentSetter(),
+                kernel);
     }
 
     protected void tearDown() throws Exception {

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/MockResourceEnvironmentSetter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/MockResourceEnvironmentSetter.java?view=auto&rev=449137
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/MockResourceEnvironmentSetter.java
(added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/MockResourceEnvironmentSetter.java
Fri Sep 22 18:01:25 2006
@@ -0,0 +1,34 @@
+/*
+ * 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.jetty6.deployment;
+
+import org.apache.geronimo.naming.deployment.ResourceEnvironmentBuilder;
+import org.apache.geronimo.naming.deployment.ResourceEnvironmentSetter;
+import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class MockResourceEnvironmentSetter implements ResourceEnvironmentSetter {
+    public void setResourceEnvironment(ResourceEnvironmentBuilder builder, XmlObject[] resourceRefs,
GerResourceRefType[] gerResourceRefs) {
+    }
+}

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/MockResourceEnvironmentSetter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/MockResourceEnvironmentSetter.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/MockResourceEnvironmentSetter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java?view=diff&rev=449137&r1=449136&r2=449137
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/test/java/org/apache/geronimo/jetty6/deployment/PlanParsingTest.java
Fri Sep 22 18:01:25 2006
@@ -7,7 +7,7 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.jar.JarFile;
-  
+
 import javax.xml.namespace.QName;
 
 import org.apache.geronimo.deployment.util.UnpackedJarFile;
@@ -40,7 +40,7 @@
 /**
  */
 public class PlanParsingTest extends TestSupport {
-    
+
     private ClassLoader classLoader = this.getClass().getClassLoader();
 
     private Naming naming = new Jsr77Naming();
@@ -54,19 +54,20 @@
 
     public PlanParsingTest() throws Exception {
         builder = new JettyModuleBuilder(defaultEnvironment,
-            new Integer(1800),
-            null,
-            jettyContainerObjectName,
-            new HashSet(),
-            new HashSet(),
-            new HashSet(),
-            pojoWebServiceTemplate,
-            Collections.singleton(webServiceBuilder),
-            null,
-            Collections.singleton(new GeronimoSecurityBuilderImpl()),
-            Collections.singleton(new GBeanBuilder(null, null)),
-            new NamingBuilderCollection(null, null), 
-            null);
+                new Integer(1800),
+                null,
+                jettyContainerObjectName,
+                new HashSet(),
+                new HashSet(),
+                new HashSet(),
+                pojoWebServiceTemplate,
+                Collections.singleton(webServiceBuilder),
+                null,
+                Collections.singleton(new GeronimoSecurityBuilderImpl()),
+                Collections.singleton(new GBeanBuilder(null, null)),
+                new NamingBuilderCollection(null, null),
+                new MockResourceEnvironmentSetter(),
+                null);
     }
 
     public void testContents() throws Exception {
@@ -103,7 +104,7 @@
 
     public void testOldFormat() throws Exception {
         URL resourcePlan = classLoader.getResource("plans/plan2.xml");
-        assertTrue(resourcePlan!= null);
+        assertTrue(resourcePlan != null);
         JettyWebAppType jettyWebApp = builder.getJettyWebApp(new File(resourcePlan.getFile()),
null, true, null, null);
         assertEquals(1, jettyWebApp.getResourceRefArray().length);
 //        assertEquals(4, jettyWebApp.getSecurity().getRoleMappings().getRoleArray().length);
@@ -148,7 +149,8 @@
         configId.setType("car");
     }
 
-    /** This test has 2 purposes: one the obvious one explicitly tested,
+    /**
+     * This test has 2 purposes: one the obvious one explicitly tested,
      * the other that passing a JettyWebAppType XmlObject in works.  This latter
      * models a web-app element inside an ear plan.
      *

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java?view=diff&rev=449137&r1=449136&r2=449137
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
Fri Sep 22 18:01:25 2006
@@ -63,6 +63,7 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
+import org.apache.geronimo.naming.deployment.ResourceEnvironmentSetter;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.geronimo.security.util.URLPattern;
 import org.apache.geronimo.xbeans.javaee.FilterMappingType;
@@ -101,6 +102,7 @@
     protected final Kernel kernel;
     protected final NamespaceDrivenBuilderCollection securityBuilders;
     protected final NamespaceDrivenBuilderCollection serviceBuilders;
+    protected final ResourceEnvironmentSetter resourceEnvironmentSetter;
 
     protected final NamingBuilder namingBuilders;
 
@@ -114,12 +116,12 @@
      */
     private static final URI RELATIVE_MODULE_BASE_URI = URI.create("../");
 
-    protected AbstractWebModuleBuilder(Kernel kernel, Collection securityBuilders, Collection
serviceBuilders, NamingBuilder namingBuilders) {
+    protected AbstractWebModuleBuilder(Kernel kernel, Collection securityBuilders, Collection
serviceBuilders, NamingBuilder namingBuilders, ResourceEnvironmentSetter resourceEnvironmentSetter)
{
         this.kernel = kernel;
         this.securityBuilders = new NamespaceDrivenBuilderCollection(securityBuilders);
         this.serviceBuilders = new NamespaceDrivenBuilderCollection(serviceBuilders);
         this.namingBuilders = namingBuilders;
-
+        this.resourceEnvironmentSetter = resourceEnvironmentSetter;
     }
 
     static {

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java?view=diff&rev=449137&r1=449136&r2=449137
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-web-2.5-builder/src/test/java/org/apache/geronimo/web25/deployment/SchemaConversionTest.java
Fri Sep 22 18:01:25 2006
@@ -39,7 +39,7 @@
 import org.apache.xmlbeans.XmlOptions;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class SchemaConversionTest extends XmlBeansTestSupport {
 
@@ -130,7 +130,7 @@
     private static class WebModuleBuilder extends AbstractWebModuleBuilder {
 
         protected WebModuleBuilder(Kernel kernel) {
-            super(kernel, null, null, null);
+            super(kernel, null, null, null, null);
         }
 
         protected Module createModule(Object plan, JarFile moduleFile, String targetPath,
URL specDDUrl, boolean standAlone, String contextRoot, AbstractName earName, Naming naming,
ModuleIDBuilder idBuilder) throws DeploymentException {



Mime
View raw message