geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r451924 [1/2] - in /geronimo/sandbox/javaee5: ./ assemblies-jee5/geronimo-jetty6-jee5/ configs-jee5/ configs-jee5/jetty6-clustering-builder-wadi/ configs-jee5/jetty6-clustering-builder-wadi/src/ configs-jee5/jetty6-clustering-builder-wadi/s...
Date Mon, 02 Oct 2006 09:06:50 GMT
Author: gdamour
Date: Mon Oct  2 02:06:48 2006
New Revision: 451924

URL: http://svn.apache.org/viewvc?view=rev&rev=451924
Log:
Port Jetty 5 clustering code to Jetty 6.

It seems that the threading behavior of Jetty 5 and Jetty 6 differs: I observe 
that a session is being relocated to another node while it is being accessed.
It needs some more investigation.

Added:
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/LICENSE.txt
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/NOTICE.txt
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/pom.xml
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/src/
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/src/plan/
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/src/plan/plan.xml
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/LICENSE.txt
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/NOTICE.txt
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/pom.xml
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/src/
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/src/plan/
    geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/src/plan/plan.xml
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/pom.xml
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/xmlconfig.xml
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/pom.xml
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandlerFactory.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/AbstractPreHandler.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHandler.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/PreHandler.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/PreHandlerFactory.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/AbstractClusteredPreHandler.java
      - copied, changed from r449376, geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/AbstractClusteredHandleInterceptor.java
Removed:
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/AbstractClusteredHandleInterceptor.java
Modified:
    geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/pom.xml
    geronimo/sandbox/javaee5/configs-jee5/jetty6/pom.xml
    geronimo/sandbox/javaee5/configs-jee5/pom.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/PlanParsingTest.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
    geronimo/sandbox/javaee5/modules-jee5/pom.xml
    geronimo/sandbox/javaee5/pom.xml

Modified: geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/pom.xml?view=diff&rev=451924&r1=451923&r2=451924
==============================================================================
--- geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/pom.xml (original)
+++ geronimo/sandbox/javaee5/assemblies-jee5/geronimo-jetty6-jee5/pom.xml Mon Oct  2 02:06:48 2006
@@ -107,6 +107,20 @@
         
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jetty6-clustering-wadi</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jetty6-clustering-builder-wadi</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>directory</artifactId>
             <version>${pom.version}</version>
             <type>car</type>
@@ -274,6 +288,18 @@
             <type>car</type>
         </dependency>
         
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jetty-clustering-builder-wadi</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </dependency> 
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jetty-clustering-wadi</artifactId> 
+            <version>${pom.version}</version>
+            <type>car</type>
+        </dependency>
     </dependencies>
     
     <build>

Added: geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/LICENSE.txt?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/LICENSE.txt (added)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/LICENSE.txt Mon Oct  2 02:06:48 2006
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+

Added: geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/NOTICE.txt?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/NOTICE.txt (added)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/NOTICE.txt Mon Oct  2 02:06:48 2006
@@ -0,0 +1,3 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Added: geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/pom.xml?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/pom.xml (added)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/pom.xml Mon Oct  2 02:06:48 2006
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+  
+  Licensed 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.
+-->
+
+<!-- $Rev: 446775 $ $Date: 2006-09-16 09:05:16 +1000 (Sat, 16 Sep 2006) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.configs</groupId>
+        <artifactId>configs-jee5</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>jetty6-clustering-builder-wadi</artifactId>
+    <name>Geronimo Configs :: Jetty 6 :: Clustering Builder for WADI</name>
+    <packaging>car</packaging>
+
+    <properties>
+        <PlanDefaultSweepInterval>36000</PlanDefaultSweepInterval>
+        <PlanDefaultNumPartitions>24</PlanDefaultNumPartitions>
+    </properties>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jetty6-deployer</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-jetty6-clustering-builder-wadi</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-clustering</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-clustering-wadi</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-jetty6-clustering-wadi</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.wadi</groupId>
+            <artifactId>wadi-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.wadi</groupId>
+            <artifactId>wadi-group</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.wadi</groupId>
+            <artifactId>wadi-activecluster</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>incubator-activemq</groupId>
+            <artifactId>activecluster</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>incubator-activemq</groupId>
+             <artifactId>activemq</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.wadi</groupId>
+            <artifactId>wadi-tribes</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.catalina.tribes</groupId>
+            <artifactId>tribes</artifactId>
+        </dependency>
+    </dependencies>
+    
+</project>

Added: geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/src/plan/plan.xml?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/src/plan/plan.xml (added)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-builder-wadi/src/plan/plan.xml Mon Oct  2 02:06:48 2006
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+  
+  Licensed 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.
+-->
+
+<!-- $Rev: 446731 $ $Date: 2006-09-16 06:45:01 +1000 (Sat, 16 Sep 2006) $ -->
+
+<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+
+    <gbean name="JettyClusteringBuilder" class="org.apache.geronimo.jetty6.cluster.wadi.builder.WADIJettyClusteringBuilder">
+        <attribute name="defaultSweepInterval">${PlanDefaultSweepInterval}</attribute>
+        <attribute name="defaultNumPartitions">${PlanDefaultNumPartitions}</attribute>
+        <attribute name="defaultReplicationManagerFactoryName">?name=DefaultReplicationManagerFactory</attribute>
+        <attribute name="defaultReplicaStorageFactoryName">?name=DefaultReplicaStorageFactory</attribute>
+        <attribute name="defaultBackingStrategyFactoryName">?name=DefaultBackingStrategyFactory</attribute>
+        <attribute name="defaultDispatcherHolderName">?name=DefaultDispatcherHolder</attribute>
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>jetty6-clustering-wadi</artifactId>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
+    </gbean>
+
+</module>

Added: geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/LICENSE.txt?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/LICENSE.txt (added)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/LICENSE.txt Mon Oct  2 02:06:48 2006
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+

Added: geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/NOTICE.txt?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/NOTICE.txt (added)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/NOTICE.txt Mon Oct  2 02:06:48 2006
@@ -0,0 +1,3 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Added: geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/pom.xml?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/pom.xml (added)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/pom.xml Mon Oct  2 02:06:48 2006
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+  
+  Licensed 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.
+-->
+
+<!-- $Rev: 446727 $ $Date: 2006-09-16 06:43:43 +1000 (Sat, 16 Sep 2006) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.configs</groupId>
+        <artifactId>configs-jee5</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>jetty6-clustering-wadi</artifactId>
+    <name>Geronimo Configs :: Jetty 6 Clustering over WADI</name>
+    <packaging>car</packaging>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-jetty6-clustering-wadi</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>jetty6</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>wadi-clustering</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </dependency>
+    </dependencies>
+    
+</project>

Added: geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/src/plan/plan.xml?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/src/plan/plan.xml (added)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6-clustering-wadi/src/plan/plan.xml Mon Oct  2 02:06:48 2006
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+  
+  Licensed 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.
+-->
+
+<!-- $Rev: 446730 $ $Date: 2006-09-16 06:44:51 +1000 (Sat, 16 Sep 2006) $ -->
+
+<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+</module>

Modified: geronimo/sandbox/javaee5/configs-jee5/jetty6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/jetty6/pom.xml?view=diff&rev=451924&r1=451923&r2=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/jetty6/pom.xml (original)
+++ geronimo/sandbox/javaee5/configs-jee5/jetty6/pom.xml Mon Oct  2 02:06:48 2006
@@ -63,9 +63,10 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-clustering</artifactId>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>clustering</artifactId>
             <version>${pom.version}</version>
+            <type>car</type>
         </dependency>
 
     </dependencies>

Modified: geronimo/sandbox/javaee5/configs-jee5/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/configs-jee5/pom.xml?view=diff&rev=451924&r1=451923&r2=451924
==============================================================================
--- geronimo/sandbox/javaee5/configs-jee5/pom.xml (original)
+++ geronimo/sandbox/javaee5/configs-jee5/pom.xml Mon Oct  2 02:06:48 2006
@@ -115,7 +115,9 @@
         <module>client-transaction-jta11</module>
         <module>transaction-jta11</module>
         <module>jetty6</module>
+        <module>jetty6-clustering-wadi</module>
         <module>jetty6-deployer</module>
+        <module>jetty6-clustering-builder-wadi</module>
         <module>dojo-jetty6</module>
         <module>webconsole-jetty6</module>
     </modules>

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=451924&r1=451923&r2=451924
==============================================================================
--- 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 Mon Oct  2 02:06:48 2006
@@ -397,7 +397,7 @@
             webModuleData.setAttribute("distributable", distributable);
             if (Boolean.TRUE == distributable) {
                 clusteringBuilders.build(jettyWebApp, earContext, moduleContext);
-                if (webModuleData.getReferencePatterns(JettyWebAppContext.GBEAN_REF_WEB_APPLICATION_HANDLER_FACTORY) == null)
+                if (webModuleData.getReferencePatterns(JettyWebAppContext.GBEAN_REF_SESSION_HANDLER_FACTORY) == null)
                 {
                     log.warn("No clustering builders configured: app will not be clustered");
                     configureNoClustering(moduleContext, webModuleData);

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=451924&r1=451923&r2=451924
==============================================================================
--- 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 Mon Oct  2 02:06:48 2006
@@ -180,7 +180,7 @@
         JarFile dummyFile = new JarFile(new File(war.getFile()));
         JettyWebAppType GerWebAppType = builder.getJettyWebApp(null, dummyFile, true, null, null);
 
-        assertEquals("war2", GerWebAppType.getContextRoot());
+        assertEquals("/war2", GerWebAppType.getContextRoot());
 
     }
 

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/pom.xml?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/pom.xml (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/pom.xml Mon Oct  2 02:06:48 2006
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Copyright 2006 The Apache Software Foundation
+
+    Licensed 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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.modules</groupId>
+        <artifactId>modules-jee5</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>geronimo-jetty6-clustering-builder-wadi</artifactId>
+    <name>Geronimo :: Jetty 6 :: Clustering Builder for WADI</name>
+    
+    <dependencies>
+
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-jetty6-clustering-wadi</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-naming-builder</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <!-- Thirdparty Dependencies -->
+        <dependency>
+            <groupId>xmlbeans</groupId>
+            <artifactId>xbean</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>stax</groupId>
+            <artifactId>stax-api</artifactId>
+        </dependency>
+
+    </dependencies>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>xmlbeans-maven-plugin</artifactId>
+                <configuration>
+                    <sourceSchemas>geronimo-clustering-wadi-1.2.xsd</sourceSchemas>
+                </configuration>
+            </plugin>
+            
+            <!--
+            HACK: Copy the generated XmlBeans bits for clover
+            -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <mkdir dir="${pom.basedir}/target/clover/classes"/>
+                                <copy todir="${pom.basedir}/target/clover/classes">
+                                    <fileset dir="${pom.basedir}/target/classes">
+                                        <include name="schemaorg_apache_xmlbeans/**"/>
+                                    </fileset>
+                                </copy>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
+

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/builder/WADIJettyClusteringBuilder.java Mon Oct  2 02:06:48 2006
@@ -0,0 +1,311 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.cluster.wadi.builder;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.apache.geronimo.clustering.wadi.BasicWADISessionManager;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
+import org.apache.geronimo.deployment.service.EnvironmentBuilder;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.deployment.EARContext;
+import org.apache.geronimo.j2ee.deployment.WebModule;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.jetty6.JettyWebAppContext;
+import org.apache.geronimo.jetty6.cluster.ClusteredSessionHandlerFactory;
+import org.apache.geronimo.jetty6.cluster.wadi.WADIClusteredPreHandlerFactory;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
+import org.apache.geronimo.schema.NamespaceElementConverter;
+import org.apache.geronimo.schema.SchemaConversionUtils;
+import org.apache.geronimo.xbeans.geronimo.GerClusteringWadiDocument;
+import org.apache.geronimo.xbeans.geronimo.GerClusteringWadiType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
+import org.apache.xmlbeans.QNameSet;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+public class WADIJettyClusteringBuilder implements NamespaceDrivenBuilder {
+    private static final QName CLUSTERING_WADI_QNAME = GerClusteringWadiDocument.type.getDocumentElementName();
+    private static final QNameSet CLUSTERING_WADI_QNAME_SET = QNameSet.singleton(CLUSTERING_WADI_QNAME);
+
+    private final int defaultSweepInterval;
+    private final int defaultNumPartitions;
+    private final AbstractNameQuery defaultRepManagerFactoryName;
+    private final AbstractNameQuery defaultRepStorageFactoryName;
+    private final AbstractNameQuery defaultBackingStrategyFactoryName;
+    private final AbstractNameQuery defaultDispatcherHolderName;
+    private final Environment defaultEnvironment;
+
+    public WADIJettyClusteringBuilder(int defaultSweepInterval,
+            int defaultNumPartitions,
+            AbstractNameQuery defaultRepManagerFactoryName,
+            AbstractNameQuery defaultRepStorageFactoryName,
+            AbstractNameQuery defaultBackingStrategyFactoryName,
+            AbstractNameQuery defaultDispatcherHolderName,
+            Environment defaultEnvironment) {
+        this.defaultSweepInterval = defaultSweepInterval;
+        this.defaultNumPartitions = defaultNumPartitions;
+        this.defaultRepManagerFactoryName = defaultRepManagerFactoryName;
+        this.defaultRepStorageFactoryName = defaultRepStorageFactoryName;
+        this.defaultBackingStrategyFactoryName = defaultBackingStrategyFactoryName;
+        this.defaultDispatcherHolderName = defaultDispatcherHolderName;
+        this.defaultEnvironment = defaultEnvironment;
+        SchemaConversionUtils.registerNamespaceConversions(Collections.singletonMap(CLUSTERING_WADI_QNAME.getLocalPart(), new NamespaceElementConverter(CLUSTERING_WADI_QNAME.getNamespaceURI())));
+    }
+
+    public void buildEnvironment(XmlObject container, Environment environment) throws DeploymentException {
+        if (getWadiClusterConfig(container) != null) {
+            EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
+        }
+    }
+
+    public void build(XmlObject container, DeploymentContext applicationContext, DeploymentContext moduleContext) throws DeploymentException {
+        GerClusteringWadiType clusteringWadiType = getWadiClusterConfig(container);
+        if (clusteringWadiType != null) {
+            GBeanData webModuleData = extractWebModule(moduleContext);
+            try {
+                AbstractName sessionManagerName = addSessionManager(clusteringWadiType, moduleContext);
+                addSessionHandlerFactory(moduleContext, webModuleData, sessionManagerName);
+                addPreHandlerFactory(moduleContext, webModuleData, sessionManagerName);
+            } catch (GBeanAlreadyExistsException e) {
+                throw new DeploymentException("Duplicate GBean", e);
+            }
+        }
+    }
+
+    private GBeanData extractWebModule(DeploymentContext moduleContext) throws DeploymentException {
+        Configuration configuration = moduleContext.getConfiguration();
+        AbstractNameQuery webModuleQuery = new AbstractNameQuery(configuration.getId(), Collections.EMPTY_MAP, Collections.singleton(JettyWebAppContext.class.getName()));
+        try {
+            return configuration.findGBeanData(webModuleQuery);
+        } catch (GBeanNotFoundException e) {
+            throw new DeploymentException("Could not locate web module gbean in web app configuration", e);
+        }
+    }
+
+    public String getNamespace() {
+        XmlBeansUtil.registerSubstitutionGroupElements(org.apache.geronimo.xbeans.geronimo.j2ee.GerClusteringDocument.type.getDocumentElementName(), CLUSTERING_WADI_QNAME_SET);
+        return CLUSTERING_WADI_QNAME.getNamespaceURI();
+    }
+
+    private GerClusteringWadiType getWadiClusterConfig(XmlObject container) throws DeploymentException {
+        XmlObject[] items = container.selectChildren(CLUSTERING_WADI_QNAME_SET);
+        if (items.length > 1) {
+            throw new DeploymentException("Unexpected count of clustering elements in geronimo plan " + items.length + " qnameset: " + CLUSTERING_WADI_QNAME_SET);
+        }
+        if (items.length == 1) {
+            return (GerClusteringWadiType) items[0].copy().changeType(GerClusteringWadiType.type);
+        }
+        return null;
+    }
+
+    public boolean canConfigure(XmlObject clusteringXmlObject) {
+        return null == clusteringXmlObject || clusteringXmlObject instanceof GerClusteringWadiType;
+    }
+
+    public void configureEnvironment(XmlObject clusteringXmlObject, Environment environment) throws DeploymentException {
+        if (false == canConfigure(clusteringXmlObject)) {
+            throw new DeploymentException("Builder does not support [" + clusteringXmlObject + "]");
+        }
+
+        EnvironmentBuilder.mergeEnvironments(environment, defaultEnvironment);
+    }
+
+    public void configureJettyWebAppContext(XmlObject clusteringXmlObject, WebModule module, GBeanData webModuleData)
+        throws DeploymentException, GBeanAlreadyExistsException {
+        if (null == clusteringXmlObject) {
+            clusteringXmlObject = GerClusteringWadiType.Factory.newInstance();
+        }
+        if (!(clusteringXmlObject instanceof GerClusteringWadiType)) {
+            throw new DeploymentException("Builder does not support [" + clusteringXmlObject + "]");
+        }
+        GerClusteringWadiType clustering = (GerClusteringWadiType) clusteringXmlObject;
+
+        EARContext moduleContext = module.getEarContext();
+
+        AbstractName sessionManagerName = addSessionManager(clustering, moduleContext);
+        addSessionHandlerFactory(moduleContext, webModuleData, sessionManagerName);
+        addPreHandlerFactory(moduleContext, webModuleData, sessionManagerName);
+    }
+
+    private AbstractName addSessionManager(GerClusteringWadiType clustering, DeploymentContext moduleContext) throws GBeanAlreadyExistsException {
+        AbstractName name = moduleContext.getNaming().createChildName(moduleContext.getModuleName(),
+                "WADISessionManager", NameFactory.GERONIMO_SERVICE);
+
+        GBeanData beanData = new GBeanData(name, BasicWADISessionManager.GBEAN_INFO);
+        setSweepInterval(clustering, beanData);
+        setNumPartitions(clustering, beanData);
+        setReplicationManagerFactory(clustering, beanData);
+        setReplicaStorageFactory(clustering, beanData);
+        setBackingStrategyFactory(clustering, beanData);
+        setDispatcher(clustering, beanData);
+
+        moduleContext.addGBean(beanData);
+
+        return name;
+    }
+
+    private void setDispatcher(GerClusteringWadiType clustering, GBeanData beanData) {
+        Set patterns = new HashSet();
+        if (clustering.isSetDispatcher()) {
+            addAbstractNameQueries(patterns, clustering.getDispatcher().getPatternArray());
+        } else {
+            patterns.add(defaultDispatcherHolderName);
+        }
+        beanData.setReferencePatterns(BasicWADISessionManager.GBEAN_REF_DISPATCHER_HOLDER, patterns);
+    }
+
+    private void setBackingStrategyFactory(GerClusteringWadiType clustering, GBeanData beanData) {
+        Set patterns = new HashSet();
+        if (clustering.isSetBackingStrategyFactory()) {
+            addAbstractNameQueries(patterns, clustering.getBackingStrategyFactory().getPatternArray());
+        } else {
+            patterns.add(defaultBackingStrategyFactoryName);
+        }
+        beanData.setReferencePatterns(BasicWADISessionManager.GBEAN_REF_BACKING_STRATEGY_FACTORY, patterns);
+    }
+
+    private void setReplicaStorageFactory(GerClusteringWadiType clustering, GBeanData beanData) {
+        Set patterns = new HashSet();
+        if (clustering.isSetReplicaStorageFactory()) {
+            addAbstractNameQueries(patterns, clustering.getReplicaStorageFactory().getPatternArray());
+        } else {
+            patterns.add(defaultRepStorageFactoryName);
+        }
+        beanData.setReferencePatterns(BasicWADISessionManager.GBEAN_REF_REPLICA_STORAGE_FACTORY, patterns);
+    }
+
+    private void setReplicationManagerFactory(GerClusteringWadiType clustering, GBeanData beanData) {
+        Set patterns = new HashSet();
+        if (clustering.isSetReplicationManagerFactory()) {
+            addAbstractNameQueries(patterns, clustering.getReplicationManagerFactory().getPatternArray());
+        } else {
+            patterns.add(defaultRepManagerFactoryName);
+        }
+        beanData.setReferencePatterns(BasicWADISessionManager.GBEAN_REF_REPLICATION_MANAGER_FACTORY, patterns);
+    }
+
+    private void setNumPartitions(GerClusteringWadiType clustering, GBeanData beanData) {
+        int numPartitions = defaultNumPartitions;
+        if (clustering.isSetNumPartitions()) {
+            numPartitions = clustering.getNumPartitions().intValue();
+        }
+        beanData.setAttribute(BasicWADISessionManager.GBEAN_ATTR_NUM_PARTITIONS, new Integer(numPartitions));
+    }
+
+    private void setSweepInterval(GerClusteringWadiType clustering, GBeanData beanData) {
+        int sweepInterval = defaultSweepInterval;
+        if (clustering.isSetSweepInterval()) {
+            sweepInterval = clustering.getSweepInterval().intValue();
+        }
+        beanData.setAttribute(BasicWADISessionManager.GBEAN_ATTR_SWEEP_INTERVAL, new Integer(sweepInterval));
+    }
+
+    private AbstractName addPreHandlerFactory(DeploymentContext moduleContext,
+            GBeanData webModuleData, AbstractName sessionManagerName) throws GBeanAlreadyExistsException {
+        AbstractName name = moduleContext.getNaming().createChildName(moduleContext.getModuleName(),
+                "WADIClusteredPreHandlerFactory", NameFactory.GERONIMO_SERVICE);
+
+        GBeanData beanData = new GBeanData(name, WADIClusteredPreHandlerFactory.GBEAN_INFO);
+        beanData.setReferencePattern(WADIClusteredPreHandlerFactory.GBEAN_REF_WADI_SESSION_MANAGER, sessionManagerName);
+
+        webModuleData.setReferencePattern(JettyWebAppContext.GBEAN_REF_PRE_HANDLER_FACTORY, name);
+
+        moduleContext.addGBean(beanData);
+
+        return name;
+    }
+
+    private AbstractName addSessionHandlerFactory(DeploymentContext moduleContext,
+            GBeanData webModuleData, AbstractName sessionManagerName) throws GBeanAlreadyExistsException {
+        AbstractName name = moduleContext.getNaming().createChildName(moduleContext.getModuleName(),
+                "ClusteredSessionHandlerFactory", NameFactory.GERONIMO_SERVICE);
+
+        GBeanData beanData = new GBeanData(name, ClusteredSessionHandlerFactory.GBEAN_INFO);
+        beanData.setReferencePattern(ClusteredSessionHandlerFactory.GBEAN_REF_SESSION_MANAGER, sessionManagerName);
+
+        webModuleData.setReferencePattern(JettyWebAppContext.GBEAN_REF_SESSION_HANDLER_FACTORY, name);
+
+        moduleContext.addGBean(beanData);
+
+        return name;
+    }
+
+    private void addAbstractNameQueries(Set patterns, GerPatternType[] patternTypes) {
+        for (int i = 0; i < patternTypes.length; i++) {
+            AbstractNameQuery query = ENCConfigBuilder.buildAbstractNameQuery(patternTypes[i], null, null, null);
+            patterns.add(query);
+        }
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    public static final String GBEAN_ATTR_DFT_SWEEP_INTERVAL = "defaultSweepInterval";
+    public static final String GBEAN_ATTR_DFT_NUM_PARTITIONS = "defaultNumPartitions";
+    public static final String GBEAN_ATTR_DFT_REP_MANAGER_FACTORY_NAME = "defaultReplicationManagerFactoryName";
+    public static final String GBEAN_ATTR_DFT_REP_STORAGE_FACTORY_NAME = "defaultReplicaStorageFactoryName";
+    public static final String GBEAN_ATTR_DFT_BACKING_STRATEGY_FACTORY_NAME = "defaultBackingStrategyFactoryName";
+    public static final String GBEAN_ATTR_DFT_DISPATCHER_HOLDER_NAME = "defaultDispatcherHolderName";
+    public static final String GBEAN_ATTR_DFT_ENVIRONMENT = "defaultEnvironment";
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic("WADI Session Manager",
+                WADIJettyClusteringBuilder.class,
+                NameFactory.MODULE_BUILDER);
+
+        infoBuilder.addAttribute(GBEAN_ATTR_DFT_SWEEP_INTERVAL, int.class, true);
+        infoBuilder.addAttribute(GBEAN_ATTR_DFT_NUM_PARTITIONS, int.class, true);
+        infoBuilder.addAttribute(GBEAN_ATTR_DFT_REP_MANAGER_FACTORY_NAME, AbstractNameQuery.class, true);
+        infoBuilder.addAttribute(GBEAN_ATTR_DFT_REP_STORAGE_FACTORY_NAME, AbstractNameQuery.class, true);
+        infoBuilder.addAttribute(GBEAN_ATTR_DFT_BACKING_STRATEGY_FACTORY_NAME, AbstractNameQuery.class, true);
+        infoBuilder.addAttribute(GBEAN_ATTR_DFT_DISPATCHER_HOLDER_NAME, AbstractNameQuery.class, true);
+        infoBuilder.addAttribute(GBEAN_ATTR_DFT_ENVIRONMENT, Environment.class, true);
+
+        infoBuilder.setConstructor(new String[]{GBEAN_ATTR_DFT_SWEEP_INTERVAL,
+                GBEAN_ATTR_DFT_NUM_PARTITIONS,
+                GBEAN_ATTR_DFT_REP_MANAGER_FACTORY_NAME,
+                GBEAN_ATTR_DFT_REP_STORAGE_FACTORY_NAME,
+                GBEAN_ATTR_DFT_BACKING_STRATEGY_FACTORY_NAME,
+                GBEAN_ATTR_DFT_DISPATCHER_HOLDER_NAME,
+                GBEAN_ATTR_DFT_ENVIRONMENT});
+
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd Mon Oct  2 02:06:48 2006
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2006 The Apache Software Foundation
+
+    Licensed 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.
+-->
+
+<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
+    targetNamespace="http://geronimo.apache.org/xml/ns/clustering-wadi-1.2"
+    xmlns:clust-wadi="http://geronimo.apache.org/xml/ns/clustering-wadi-1.2"
+    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
+    xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.2"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    elementFormDefault="qualified"
+    attributeFormDefault="unqualified">
+
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.2" schemaLocation="geronimo-naming-1.2.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/j2ee/application-1.2" schemaLocation="geronimo-application-1.2.xsd"/>
+
+    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+
+    <xs:element name="clustering-wadi" type="clust-wadi:clustering-wadiType" substitutionGroup="app:clustering"/>
+
+    <xs:complexType name="clustering-wadiType">
+        <xs:complexContent>
+            <xs:extension base="app:abstract-clusteringType">
+        <xs:sequence>
+            <xs:element name="sweepInterval" type="xs:integer" minOccurs="0"/>
+            <xs:element name="numPartitions" type="xs:integer" minOccurs="0"/>
+            <xs:element name="dispatcher" type="naming:gbean-refType" minOccurs="0"/>
+            <xs:element name="replication-manager-factory" type="naming:gbean-refType" minOccurs="0"/>
+            <xs:element name="replica-storage-factory" type="naming:gbean-refType" minOccurs="0"/>
+            <xs:element name="backing-strategy-factory" type="naming:gbean-refType" minOccurs="0"/>
+        </xs:sequence>
+        </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+</xs:schema>
+

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/xmlconfig.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/xmlconfig.xml?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/xmlconfig.xml (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-builder-wadi/src/main/schema/xmlconfig.xml Mon Oct  2 02:06:48 2006
@@ -0,0 +1,9 @@
+<xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config"
+    >
+
+    <xb:namespace uri="http://geronimo.apache.org/xml/ns/clustering-wadi-1.2">
+        <xb:package>org.apache.geronimo.xbeans.geronimo</xb:package>
+        <xb:prefix>Ger</xb:prefix>
+    </xb:namespace>
+
+</xb:config>
\ No newline at end of file

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/pom.xml?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/pom.xml (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/pom.xml Mon Oct  2 02:06:48 2006
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Copyright 2006 The Apache Software Foundation
+
+    Licensed 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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.modules</groupId>
+        <artifactId>modules-jee5</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>geronimo-jetty6-clustering-wadi</artifactId>
+    <name>Geronimo :: Jetty 6 Clustering over WADI</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-clustering-wadi</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-jetty6</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+    </dependencies>
+    
+</project>
+

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandler.java Mon Oct  2 02:06:48 2006
@@ -0,0 +1,86 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.cluster.wadi;
+
+import java.io.IOException;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.geronimo.clustering.ClusteredInvocation;
+import org.apache.geronimo.clustering.ClusteredInvocationException;
+import org.apache.geronimo.jetty6.cluster.AbstractClusteredPreHandler;
+import org.codehaus.wadi.InvocationException;
+import org.codehaus.wadi.impl.ClusteredManager;
+import org.codehaus.wadi.web.impl.WebInvocation;
+
+
+/**
+ * 
+ * @version $Rev$ $Date$
+ */
+public class WADIClusteredPreHandler extends AbstractClusteredPreHandler {
+    private final ClusteredManager wadiManager;
+
+    public WADIClusteredPreHandler(ClusteredManager wadiManager) {
+        this.wadiManager = wadiManager;
+    }
+    
+    protected ClusteredInvocation newClusteredInvocation(String target, HttpServletRequest request,
+            HttpServletResponse response, int dispatch) {
+        return new WADIWebClusteredInvocation(target, request, response, dispatch);
+    }
+    
+    protected class WADIWebClusteredInvocation extends WebClusteredInvocation {
+        
+        public WADIWebClusteredInvocation(String target, HttpServletRequest request,
+                HttpServletResponse response, int dispatch) {
+            super(target, request, response, dispatch);
+        }
+
+        public void invoke() throws ClusteredInvocationException {
+            WebInvocation invocation = WebInvocation.getThreadLocalInstance();
+            FilterChain chainAdapter = new FilterChain() {
+                public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException {
+                    try {
+                        invokeLocally();
+                    } catch (ClusteredInvocationException e) {
+                        throw (IOException) new IOException().initCause(e);
+                    }
+                }
+            };
+            invocation.init(request, response, chainAdapter);
+            try {
+                wadiManager.contextualise(invocation);
+            } catch (InvocationException e) {
+                Throwable throwable = e.getCause();
+                if (throwable instanceof IOException) {
+                    throw new ClusteredInvocationException(throwable);
+                } else if (throwable instanceof ServletException) {
+                    throw new ClusteredInvocationException(throwable);
+                } else {
+                    throw new ClusteredInvocationException(e);
+                }
+            }
+        }
+    }
+    
+}

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandlerFactory.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandlerFactory.java?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandlerFactory.java (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/wadi/WADIClusteredPreHandlerFactory.java Mon Oct  2 02:06:48 2006
@@ -0,0 +1,78 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.cluster.wadi;
+
+import org.apache.geronimo.clustering.wadi.WADISessionManager;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.jetty6.PreHandler;
+import org.apache.geronimo.jetty6.PreHandlerFactory;
+import org.apache.geronimo.jetty6.SessionHandlerFactory;
+import org.codehaus.wadi.impl.ClusteredManager;
+
+
+/**
+ * 
+ * @version $Rev$ $Date$
+ */
+public class WADIClusteredPreHandlerFactory implements PreHandlerFactory, GBeanLifecycle {
+
+    private final WADISessionManager sessionManager;
+    private ClusteredManager wadiManager;
+
+    public WADIClusteredPreHandlerFactory(WADISessionManager sessionManager) {
+        this.sessionManager = sessionManager;
+    }
+    
+    public void doStart() throws Exception {
+        wadiManager = sessionManager.getManager();
+    }
+    
+    public void doStop() throws Exception {
+    }
+    
+    public void doFail() {
+    }
+    
+    public PreHandler createHandler() {
+        return new WADIClusteredPreHandler(wadiManager);
+    }
+    
+    public static final GBeanInfo GBEAN_INFO;
+    public static final String GBEAN_REF_WADI_SESSION_MANAGER = "WADISessionManager";
+
+    static {
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("WADI Pre-Handler Factory",
+                WADIClusteredPreHandlerFactory.class, NameFactory.GERONIMO_SERVICE);
+
+        infoFactory.addReference(GBEAN_REF_WADI_SESSION_MANAGER, WADISessionManager.class, 
+                NameFactory.GERONIMO_SERVICE);
+
+        infoFactory.addInterface(SessionHandlerFactory.class);
+
+        infoFactory.setConstructor(new String[]{GBEAN_REF_WADI_SESSION_MANAGER});
+
+        GBEAN_INFO = infoFactory.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}

Added: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/AbstractPreHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/AbstractPreHandler.java?view=auto&rev=451924
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/AbstractPreHandler.java (added)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/AbstractPreHandler.java Mon Oct  2 02:06:48 2006
@@ -0,0 +1,69 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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;
+
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.Server;
+
+/**
+ * @version $Rev: 449059 $ $Date: 2006-09-23 05:23:09 +1000 (Sat, 23 Sep 2006) $
+ */
+public abstract class AbstractPreHandler implements PreHandler {
+    protected Handler next;
+    
+    public final void setNextHandler(Handler next) {
+        this.next = next;
+    }
+    
+    public final Server getServer() {
+        throw new UnsupportedOperationException();
+    }
+
+    public final boolean isFailed() {
+        throw new UnsupportedOperationException();
+    }
+
+    public final boolean isRunning() {
+        throw new UnsupportedOperationException();
+    }
+
+    public final boolean isStarted() {
+        throw new UnsupportedOperationException();
+    }
+
+    public final boolean isStarting() {
+        throw new UnsupportedOperationException();
+    }
+
+    public final boolean isStopping() {
+        throw new UnsupportedOperationException();
+    }
+
+    public final void setServer(Server server) {
+        throw new UnsupportedOperationException();
+    }
+
+    public final void start() throws Exception {
+        throw new UnsupportedOperationException();
+    }
+
+    public final void stop() throws Exception {
+        throw new UnsupportedOperationException();
+    }
+
+}



Mime
View raw message