geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r609574 - in /geronimo/server/trunk/plugins/tomcat: geronimo-tomcat6-clustering-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/ geronimo-tomcat6-clustering-wadi/src/test/ geronimo-tomcat6-clustering-wadi/src/test/java/ geronimo-tomca...
Date Mon, 07 Jan 2008 11:39:10 GMT
Author: gdamour
Date: Mon Jan  7 03:39:06 2008
New Revision: 609574

URL: http://svn.apache.org/viewvc?rev=609574&view=rev
Log:
* move classes depending on geronimo-clustering from geronimo-tomcat6 to
geronimo-tomcat6-clustering-wadi; and
* remove geronimo-clustering dependency from geronimo-tomcat6.

This way the wadi-clustering config. does not need to be used when 
clustering is actually not used.
This fixes GERONIMO-3721 WADI modules prevent Geronimo from starting when 
offline.

Added:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/AbstractClusteredValve.java
      - copied unchanged from r609547, geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/cluster/AbstractClusteredValve.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/ClusteredManager.java
      - copied unchanged from r609547, geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/cluster/ClusteredManager.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/main/java/org/apache/geronimo/tomcat/cluster/ClusteredManagerRetriever.java
      - copied unchanged from r609547, geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/cluster/ClusteredManagerRetriever.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/tomcat/
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/tomcat/cluster/
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/tomcat/cluster/AnAbstractClusteredValveTest.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/tomcat/cluster/ClusteredManagerTest.java
      - copied unchanged from r609547, geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/cluster/ClusteredManagerTest.java
Removed:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/cluster/AbstractClusteredValve.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/cluster/ClusteredManager.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/cluster/ClusteredManagerRetriever.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/cluster/
Modified:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/pom.xml
    geronimo/server/trunk/plugins/tomcat/tomcat6-clustering-wadi/pom.xml
    geronimo/server/trunk/plugins/tomcat/tomcat6/pom.xml

Added: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/tomcat/cluster/AnAbstractClusteredValveTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/tomcat/cluster/AnAbstractClusteredValveTest.java?rev=609574&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/tomcat/cluster/AnAbstractClusteredValveTest.java
(added)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi/src/test/java/org/apache/geronimo/tomcat/cluster/AnAbstractClusteredValveTest.java
Mon Jan  7 03:39:06 2008
@@ -0,0 +1,123 @@
+/*
+ * 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.tomcat.cluster;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+
+import org.apache.catalina.Valve;
+import org.apache.catalina.connector.Request;
+import org.apache.catalina.connector.Response;
+import org.apache.geronimo.clustering.ClusteredInvocation;
+import org.apache.geronimo.clustering.ClusteredInvocationException;
+
+import com.agical.rmock.extension.junit.RMockTestCase;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public class AnAbstractClusteredValveTest extends RMockTestCase {
+
+    private AbstractClusteredValve valve;
+    private Request request;
+    private Response response;
+    private Valve nextValve;
+
+    @Override
+    protected void setUp() throws Exception {
+        valve = new AbstractClusteredValve() {
+            @Override
+            protected ClusteredInvocation newClusteredInvocation(Request request, Response
response) {
+                return new WebClusteredInvocation(request, response) {
+                    public void invoke() throws ClusteredInvocationException {
+                        invokeLocally();
+                    }
+                };
+            }
+        };
+        
+        nextValve = (Valve) mock(Valve.class);
+        valve.setNext(nextValve);
+
+        request = new Request();
+        response = new Response();
+    }
+    
+    public void testSuccessfulInvocation() throws Exception {
+        nextValve.invoke(request, response);
+        
+        startVerification();
+        
+        valve.invoke(request, response);
+    }
+    
+    public void testIOEIsUnwrapped() throws Exception {
+        nextValve.invoke(request, response);
+        IOException expected = new IOException();
+        modify().throwException(expected);
+        
+        startVerification();
+
+        try {
+            valve.invoke(request, response);
+        } catch (IOException e) {
+            assertSame(expected, e);
+        }
+    }
+    
+    public void testSEIsUnwrapped() throws Exception {
+        nextValve.invoke(request, response);
+        ServletException expected = new ServletException();
+        modify().throwException(expected);
+        
+        startVerification();
+        
+        try {
+            valve.invoke(request, response);
+        } catch (ServletException e) {
+            assertSame(expected, e);
+        }
+    }
+    
+    public void testCIEIsWrappedAsIOE() throws Exception {
+        final ClusteredInvocationException expected = new ClusteredInvocationException();
+        valve = new AbstractClusteredValve() {
+            @Override
+            protected ClusteredInvocation newClusteredInvocation(Request request, Response
response) {
+                return new WebClusteredInvocation(request, response) {
+                    public void invoke() throws ClusteredInvocationException {
+                        throw expected;
+                    }
+                };
+            }
+        };
+        
+        startVerification();
+        
+        try {
+            valve.invoke(request, response);
+        } catch (IOException e) {
+            assertSame(expected, e.getCause());
+        }
+    }
+    
+}

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/pom.xml?rev=609574&r1=609573&r2=609574&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/pom.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/pom.xml Mon Jan  7 03:39:06 2008
@@ -33,12 +33,6 @@
     <name>Geronimo Modules :: Tomcat</name>
     
     <dependencies>
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-clustering</artifactId>
-            <version>${version}</version>
-        </dependency>
-
         <!-- g-transaction, g-system comes from this -->
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>

Modified: geronimo/server/trunk/plugins/tomcat/tomcat6-clustering-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat6-clustering-wadi/pom.xml?rev=609574&r1=609573&r2=609574&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat6-clustering-wadi/pom.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat6-clustering-wadi/pom.xml Mon Jan  7 03:39:06
2008
@@ -68,6 +68,11 @@
                         <includeVersion>true</includeVersion>
                     </useMavenDependencies>
                     <category>Tomcat</category>
+                    <instance>
+                        <plugin-artifact>
+                            <config-xml-content load="false"/>
+                        </plugin-artifact>
+                    </instance>
                 </configuration>
             </plugin>
         </plugins>

Modified: geronimo/server/trunk/plugins/tomcat/tomcat6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat6/pom.xml?rev=609574&r1=609573&r2=609574&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat6/pom.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat6/pom.xml Mon Jan  7 03:39:06 2008
@@ -38,13 +38,6 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
-            <artifactId>clustering</artifactId>
-            <version>${version}</version>
-            <type>car</type>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>j2ee-server</artifactId>
             <version>${version}</version>
             <type>car</type>



Mime
View raw message