geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r446624 [1/4] - in /geronimo/server/trunk: ./ assemblies/geronimo-jetty-j2ee/ configs/jetty-clustering-builder-wadi/ configs/jetty-clustering-builder-wadi/src/ configs/jetty-clustering-builder-wadi/src/plan/ configs/jetty-clustering-wadi/ c...
Date Fri, 15 Sep 2006 15:02:16 GMT
Author: gdamour
Date: Fri Sep 15 08:02:12 2006
New Revision: 446624

URL: http://svn.apache.org/viewvc?view=rev&rev=446624
Log:
GERONIMO-2163 - WADI Integration for Jetty

Added:
    geronimo/server/trunk/configs/jetty-clustering-builder-wadi/
    geronimo/server/trunk/configs/jetty-clustering-builder-wadi/LICENSE.txt
    geronimo/server/trunk/configs/jetty-clustering-builder-wadi/NOTICE.txt
    geronimo/server/trunk/configs/jetty-clustering-builder-wadi/pom.xml
    geronimo/server/trunk/configs/jetty-clustering-builder-wadi/src/
    geronimo/server/trunk/configs/jetty-clustering-builder-wadi/src/plan/
    geronimo/server/trunk/configs/jetty-clustering-builder-wadi/src/plan/plan.xml
    geronimo/server/trunk/configs/jetty-clustering-wadi/
    geronimo/server/trunk/configs/jetty-clustering-wadi/LICENSE.txt
    geronimo/server/trunk/configs/jetty-clustering-wadi/NOTICE.txt
    geronimo/server/trunk/configs/jetty-clustering-wadi/pom.xml
    geronimo/server/trunk/configs/jetty-clustering-wadi/src/
    geronimo/server/trunk/configs/jetty-clustering-wadi/src/plan/
    geronimo/server/trunk/configs/jetty-clustering-wadi/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-clustering/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/pom.xml
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/clustering/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/clustering/wadi/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/clustering/wadi/jetty/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/clustering/wadi/jetty/WADIJettyClusteringBuilder.java
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd
    geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/xmlconfig.xml
    geronimo/server/trunk/modules/geronimo-clustering-wadi/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/ActiveClusterDispatcherHolder.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicationManagerFactoryGBean.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicWADISessionManager.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/DispatcherHolder.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/RoundRobinBackingStrategyFactoryGBean.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/TribesDispatcherHolder.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/WADIClusteredHandleInterceptor.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/WADISessionAdaptor.java
    geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/WADISessionManager.java
    geronimo/server/trunk/modules/geronimo-clustering/pom.xml
    geronimo/server/trunk/modules/geronimo-clustering/src/
    geronimo/server/trunk/modules/geronimo-clustering/src/main/
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/BasicNode.java
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/ClusteredInvocation.java
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/ClusteredInvocationException.java
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/Node.java
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/Session.java
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/SessionAlreadyExistException.java
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/SessionListener.java
    geronimo/server/trunk/modules/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/SessionManager.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/DefaultWebApplicationHandlerFactory.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/GeronimoServletHttpRequest.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/HandleInterceptor.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/WebApplicationHandlerFactory.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/cluster/
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/cluster/AbstractClusteredHandleInterceptor.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/cluster/ClusteredSessionManager.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/cluster/ClusteredWebApplicationHandler.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/cluster/ClusteredWebApplicationHandlerFactory.java
Modified:
    geronimo/server/trunk/assemblies/geronimo-jetty-j2ee/pom.xml
    geronimo/server/trunk/configs/jetty-deployer/src/plan/plan.xml
    geronimo/server/trunk/configs/jetty/pom.xml
    geronimo/server/trunk/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/NamespaceDrivenBuilder.java
    geronimo/server/trunk/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/NamespaceDrivenBuilderCollection.java
    geronimo/server/trunk/modules/geronimo-j2ee-builder/src/main/schema/geronimo-application-1.2.xsd
    geronimo/server/trunk/modules/geronimo-jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-jetty-builder/src/main/schema/geronimo-jetty-1.2.xsd
    geronimo/server/trunk/modules/geronimo-jetty-builder/src/test/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/server/trunk/modules/geronimo-jetty-builder/src/test/java/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
    geronimo/server/trunk/modules/geronimo-jetty/pom.xml
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/JettyWebAppContext.java
    geronimo/server/trunk/modules/geronimo-jetty/src/main/java/org/apache/geronimo/jetty/interceptor/RequestWrappingBeforeAfter.java
    geronimo/server/trunk/modules/geronimo-jetty/src/test/java/org/apache/geronimo/jetty/AbstractWebModuleTest.java
    geronimo/server/trunk/modules/geronimo-security-builder/src/main/java/org/apache/geronimo/security/deployment/GeronimoSecurityBuilderImpl.java
    geronimo/server/trunk/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/GBeanBuilder.java
    geronimo/server/trunk/modules/geronimo-tomcat/pom.xml
    geronimo/server/trunk/modules/geronimo-tomcat/src/main/java/org/apache/geronimo/tomcat/cluster/WADIGBean.java
    geronimo/server/trunk/modules/pom.xml
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/assemblies/geronimo-jetty-j2ee/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-jetty-j2ee/pom.xml?view=diff&rev=446624&r1=446623&r2=446624
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-jetty-j2ee/pom.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-jetty-j2ee/pom.xml Fri Sep 15 08:02:12 2006
@@ -219,6 +219,19 @@
         
         <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>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>welcome-jetty</artifactId>
             <version>${pom.version}</version>
             <type>car</type>

Added: geronimo/server/trunk/configs/jetty-clustering-builder-wadi/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-clustering-builder-wadi/LICENSE.txt?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-clustering-builder-wadi/LICENSE.txt (added)
+++ geronimo/server/trunk/configs/jetty-clustering-builder-wadi/LICENSE.txt Fri Sep 15 08:02:12 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/server/trunk/configs/jetty-clustering-builder-wadi/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-clustering-builder-wadi/NOTICE.txt?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-clustering-builder-wadi/NOTICE.txt (added)
+++ geronimo/server/trunk/configs/jetty-clustering-builder-wadi/NOTICE.txt Fri Sep 15 08:02:12 2006
@@ -0,0 +1,3 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Added: geronimo/server/trunk/configs/jetty-clustering-builder-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-clustering-builder-wadi/pom.xml?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-clustering-builder-wadi/pom.xml (added)
+++ geronimo/server/trunk/configs/jetty-clustering-builder-wadi/pom.xml Fri Sep 15 08:02:12 2006
@@ -0,0 +1,116 @@
+<?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.configs</groupId>
+        <artifactId>configs</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>jetty-clustering-builder-wadi</artifactId>
+    <name>Geronimo Configs :: Jetty Clustering Builder WADI</name>
+    <packaging>car</packaging>
+
+    <properties>
+        <PlanDefaultSweepInterval>36000</PlanDefaultSweepInterval>
+        <PlanDefaultNumPartitions>24</PlanDefaultNumPartitions>
+    </properties>
+    
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-deployer</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </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-clustering-builder</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-clustering-builder-wadi</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-jetty</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/server/trunk/configs/jetty-clustering-builder-wadi/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-clustering-builder-wadi/src/plan/plan.xml?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-clustering-builder-wadi/src/plan/plan.xml (added)
+++ geronimo/server/trunk/configs/jetty-clustering-builder-wadi/src/plan/plan.xml Fri Sep 15 08:02:12 2006
@@ -0,0 +1,43 @@
+<!--
+
+    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$ -->
+<!--               parentId="${pom.groupId}/j2ee-deployer/${pom.currentVersion}/car"
+-->
+<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+
+    <gbean name="JettyClusteringBuilder" class="org.apache.geronimo.clustering.wadi.jetty.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>jetty-clustering-wadi</artifactId>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
+    </gbean>
+
+</module>

Added: geronimo/server/trunk/configs/jetty-clustering-wadi/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-clustering-wadi/LICENSE.txt?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-clustering-wadi/LICENSE.txt (added)
+++ geronimo/server/trunk/configs/jetty-clustering-wadi/LICENSE.txt Fri Sep 15 08:02:12 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/server/trunk/configs/jetty-clustering-wadi/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-clustering-wadi/NOTICE.txt?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-clustering-wadi/NOTICE.txt (added)
+++ geronimo/server/trunk/configs/jetty-clustering-wadi/NOTICE.txt Fri Sep 15 08:02:12 2006
@@ -0,0 +1,3 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Added: geronimo/server/trunk/configs/jetty-clustering-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-clustering-wadi/pom.xml?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-clustering-wadi/pom.xml (added)
+++ geronimo/server/trunk/configs/jetty-clustering-wadi/pom.xml Fri Sep 15 08:02:12 2006
@@ -0,0 +1,103 @@
+<?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.configs</groupId>
+        <artifactId>configs</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>jetty-clustering-wadi</artifactId>
+    <name>Geronimo Configs :: Jetty Clustering WADI</name>
+    <packaging>car</packaging>
+    
+    <properties>
+        <PlanDefaultSweepInterval>36000</PlanDefaultSweepInterval>
+        <PlanDefaultNumPartitions>24</PlanDefaultNumPartitions>
+        <PlanNbReplica>2</PlanNbReplica>
+        <PlanClusterName>DEFAULT_CLUSTER</PlanClusterName>
+        <PlanInactiveTime>3600</PlanInactiveTime>
+        <PlanNodeName>NODE</PlanNodeName>
+        <PlanClusterUri>tcp://localhost:61618</PlanClusterUri>
+    </properties>
+
+    <dependencies>
+
+        <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.configs</groupId>
+            <artifactId>jetty</artifactId>
+            <version>${pom.version}</version>
+            <type>car</type>
+        </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/server/trunk/configs/jetty-clustering-wadi/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-clustering-wadi/src/plan/plan.xml?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-clustering-wadi/src/plan/plan.xml (added)
+++ geronimo/server/trunk/configs/jetty-clustering-wadi/src/plan/plan.xml Fri Sep 15 08:02:12 2006
@@ -0,0 +1,56 @@
+<!--
+
+    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$ -->
+<!--               parentId="${pom.groupId}/j2ee-deployer/${pom.currentVersion}/car"
+-->
+<module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+
+    <gbean name="DefaultReplicationManagerFactory" class="org.apache.geronimo.clustering.wadi.BasicReplicationManagerFactoryGBean">
+    </gbean>
+
+    <gbean name="DefaultReplicaStorageFactory" class="org.apache.geronimo.clustering.wadi.BasicReplicaStorageFactoryGBean">
+    </gbean>
+
+    <gbean name="DefaultBackingStrategyFactory" class="org.apache.geronimo.clustering.wadi.RoundRobinBackingStrategyFactoryGBean">
+        <attribute name="nbReplica">${PlanNbReplica}</attribute>
+    </gbean>
+
+    <gbean name="DefaultDispatcherHolder" class="org.apache.geronimo.clustering.wadi.ActiveClusterDispatcherHolder">
+        <attribute name="clusterName">${PlanClusterName}</attribute>
+        <attribute name="clusterUri">${PlanClusterUri}</attribute>
+        <attribute name="inactiveTime">${PlanInactiveTime}</attribute>
+        <reference name="Node">
+            <name>Node</name>
+        </reference>
+    </gbean>
+
+    <!--
+    <gbean name="DefaultDispatcherHolder" class="org.apache.geronimo.clustering.wadi.TribesDispatcherHolder">
+        <attribute name="clusterName">${PlanClusterName}</attribute>
+        <attribute name="inactiveTime">${PlanInactiveTime}</attribute>
+        <reference name="Node">
+            <name>Node</name>
+        </reference>
+    </gbean>
+    -->
+
+    <gbean name="Node" class="org.apache.geronimo.clustering.BasicNode">
+        <attribute name="nodeName">${PlanNodeName}</attribute>
+    </gbean>
+
+</module>

Modified: geronimo/server/trunk/configs/jetty-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty-deployer/src/plan/plan.xml?view=diff&rev=446624&r1=446623&r2=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty-deployer/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/jetty-deployer/src/plan/plan.xml Fri Sep 15 08:02:12 2006
@@ -51,6 +51,9 @@
         <reference name="NamingBuilders">
             <name>NamingBuilders</name>
         </reference>
+        <reference name="ClusteringBuilders">
+            <name>JettyClusteringBuilder</name>
+        </reference>
         <xml-attribute name="defaultEnvironment">
             <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
                 <dependencies>

Modified: geronimo/server/trunk/configs/jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/jetty/pom.xml?view=diff&rev=446624&r1=446623&r2=446624
==============================================================================
--- geronimo/server/trunk/configs/jetty/pom.xml (original)
+++ geronimo/server/trunk/configs/jetty/pom.xml Fri Sep 15 08:02:12 2006
@@ -47,6 +47,13 @@
             <version>${pom.version}</version>
         </dependency>
 
+        <!-- This dependency should be retrieved by transitivity -->
+        <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-webservices</artifactId>

Added: geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/pom.xml?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/pom.xml (added)
+++ geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/pom.xml Fri Sep 15 08:02:12 2006
@@ -0,0 +1,121 @@
+<?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</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>geronimo-clustering-builder-wadi</artifactId>
+    <name>Geronimo Clustering Builder WADI</name>
+    
+    <!--
+    
+    HACK: Need to explicitly configure SCM for this module since its artifactId
+          does not match the directory it lives in.
+    
+    FIXME: Rename module directory or artifactId.
+    
+    -->
+    <scm>
+        <connection>scm:svn:https://svn.apache.org/repos/asf/geronimo/trunk/modules/clustering-builder-wadi</connection>
+        <developerConnection>scm:svn:https://${maven.username}@svn.apache.org/repos/asf/geronimo/trunk/modules/clustering-builder-wadi</developerConnection>
+        <url>http://svn.apache.org/repos/asf/geronimo/trunk/modules/clustering-builder-wadi</url>
+    </scm>
+    
+    <dependencies>
+        <!-- not part of the patch
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-clustering-builder</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+	-->
+
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-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/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/clustering/wadi/jetty/WADIJettyClusteringBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/clustering/wadi/jetty/WADIJettyClusteringBuilder.java?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/clustering/wadi/jetty/WADIJettyClusteringBuilder.java (added)
+++ geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/java/org/apache/geronimo/clustering/wadi/jetty/WADIJettyClusteringBuilder.java Fri Sep 15 08:02:12 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.clustering.wadi.jetty;
+
+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.clustering.wadi.WADIClusteredHandleInterceptor;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.deployment.service.EnvironmentBuilder;
+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.jetty.JettyWebAppContext;
+import org.apache.geronimo.jetty.cluster.ClusteredWebApplicationHandlerFactory;
+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.xbeans.geronimo.GerClusteringWadiDocument;
+import org.apache.geronimo.xbeans.geronimo.GerClusteringWadiType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
+import org.apache.geronimo.schema.SchemaConversionUtils;
+import org.apache.geronimo.schema.NamespaceElementConverter;
+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);
+                addHandlerFactory(moduleContext, webModuleData, sessionManagerName);
+                addInterceptor(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);
+        addHandlerFactory(moduleContext, webModuleData, sessionManagerName);
+        addInterceptor(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 addHandlerFactory(DeploymentContext moduleContext,
+            GBeanData webModuleData, AbstractName sessionManagerName) throws GBeanAlreadyExistsException {
+        AbstractName name = moduleContext.getNaming().createChildName(moduleContext.getModuleName(),
+                "ClusteredWebApplicationHandlerFactory", NameFactory.GERONIMO_SERVICE);
+
+        GBeanData beanData = new GBeanData(name, ClusteredWebApplicationHandlerFactory.GBEAN_INFO);
+        beanData.setReferencePattern(ClusteredWebApplicationHandlerFactory.GBEAN_REF_SESSION_MANAGER, sessionManagerName);
+
+        webModuleData.setReferencePattern(JettyWebAppContext.GBEAN_REF_WEB_APPLICATION_HANDLER_FACTORY, name);
+
+        moduleContext.addGBean(beanData);
+
+        return name;
+    }
+
+    private AbstractName addInterceptor(DeploymentContext moduleContext,
+            GBeanData webModuleData, AbstractName sessionManagerName) throws GBeanAlreadyExistsException {
+        AbstractName name = moduleContext.getNaming().createChildName(moduleContext.getModuleName(),
+                "WADIClusteredHandleInterceptor", NameFactory.GERONIMO_SERVICE);
+
+        GBeanData beanData = new GBeanData(name, WADIClusteredHandleInterceptor.GBEAN_INFO);
+        beanData.setReferencePattern(WADIClusteredHandleInterceptor.GBEAN_REF_WADI_SESSION_MANAGER, sessionManagerName);
+
+        webModuleData.setReferencePattern(JettyWebAppContext.GBEAN_REF_HANDLE_INTERCEPTOR, 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/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd (added)
+++ geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/geronimo-clustering-wadi-1.2.xsd Fri Sep 15 08:02:12 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/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/xmlconfig.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/xmlconfig.xml?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/xmlconfig.xml (added)
+++ geronimo/server/trunk/modules/geronimo-clustering-builder-wadi/src/main/schema/xmlconfig.xml Fri Sep 15 08:02:12 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/server/trunk/modules/geronimo-clustering-wadi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml (added)
+++ geronimo/server/trunk/modules/geronimo-clustering-wadi/pom.xml Fri Sep 15 08:02:12 2006
@@ -0,0 +1,109 @@
+<?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</artifactId>
+        <version>1.2-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>geronimo-clustering-wadi</artifactId>
+    <name>Geronimo Clustering WADI</name>
+    
+    <!--
+    
+    HACK: Need to explicitly configure SCM for this module since its artifactId
+          does not match the directory it lives in.
+    
+    FIXME: Rename module directory or artifactId.
+    
+    -->
+    <scm>
+        <connection>scm:svn:https://svn.apache.org/repos/asf/geronimo/trunk/modules/clustering-wadi</connection>
+        <developerConnection>scm:svn:https://${maven.username}@svn.apache.org/repos/asf/geronimo/trunk/modules/clustering-wadi</developerConnection>
+        <url>http://svn.apache.org/repos/asf/geronimo/trunk/modules/clustering-wadi</url>
+    </scm>
+
+    <repositories>
+        <repository>
+            <id>wadi-snapshots</id>
+            <name>Wadi Snapshots Repository</name>
+            <url>http://snapshots.repository.codehaus.org/org/codehaus/wadi/</url>
+            <layout>default</layout>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+    </repositories>
+    
+    <dependencies>
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-clustering</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-jetty</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.4_spec</artifactId>
+<scope>provided</scope>
+        </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>org.codehaus.wadi</groupId>
+            <artifactId>wadi-tribes</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.wadi</groupId>
+            <artifactId>wadi-tribes</artifactId>
+        </dependency>
+    </dependencies>
+    
+</project>
+

Added: geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/ActiveClusterDispatcherHolder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/ActiveClusterDispatcherHolder.java?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/ActiveClusterDispatcherHolder.java (added)
+++ geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/ActiveClusterDispatcherHolder.java Fri Sep 15 08:02:12 2006
@@ -0,0 +1,108 @@
+/**
+ *
+ * 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.clustering.wadi;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.clustering.Node;
+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.codehaus.wadi.activecluster.ActiveClusterDispatcher;
+import org.codehaus.wadi.group.Dispatcher;
+import org.codehaus.wadi.group.MessageExchangeException;
+
+/**
+ *
+ * @version $Rev$ $Date$
+ */
+public class ActiveClusterDispatcherHolder implements GBeanLifecycle, DispatcherHolder {
+    private static final Log log = LogFactory.getLog(ActiveClusterDispatcher.class); 
+    
+    private final String clusterName;
+    private final String clusterUri;
+    private final long inactiveTime;
+    private final Node node;
+
+    private ActiveClusterDispatcher dispatcher;
+
+    public ActiveClusterDispatcherHolder(String clusterName, String clusterUri, long inactiveTime, Node node) {
+        this.clusterName = clusterName;
+        this.clusterUri = clusterUri;
+        this.inactiveTime = inactiveTime;
+        this.node = node;
+    }
+
+    public void doStart() throws Exception {
+        dispatcher = new ActiveClusterDispatcher(clusterName, node.getName(), clusterUri, inactiveTime);
+        dispatcher.start();
+    }
+
+    public void doStop() throws Exception {
+        dispatcher.stop();
+    }
+
+    public void doFail() {
+        try {
+            dispatcher.stop();
+        } catch (MessageExchangeException e) {
+            log.error(e);
+        }
+    }
+    
+    public Dispatcher getDispatcher() {
+        return dispatcher;
+    }
+
+    public Node getNode() {
+        return node;
+    }
+    
+    
+    public static final GBeanInfo GBEAN_INFO;
+    
+    public static final String GBEAN_ATTR_CLUSTER_NAME = "clusterName";
+    public static final String GBEAN_ATTR_CLUSTER_URI = "clusterUri";
+    public static final String GBEAN_ATTR_INACTIVE_TIME = "inactiveTime";
+
+    public static final String GBEAN_REF_NODE = "Node";
+
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(ActiveClusterDispatcherHolder.class, 
+                NameFactory.GERONIMO_SERVICE);
+        
+        infoBuilder.addAttribute(GBEAN_ATTR_CLUSTER_NAME, String.class, true);
+        infoBuilder.addAttribute(GBEAN_ATTR_CLUSTER_URI, String.class, true);
+        infoBuilder.addAttribute(GBEAN_ATTR_INACTIVE_TIME, long.class, true);
+        
+        infoBuilder.addReference(GBEAN_REF_NODE, Node.class, NameFactory.GERONIMO_SERVICE);
+
+        infoBuilder.addInterface(DispatcherHolder.class);
+        
+        infoBuilder.setConstructor(new String[] { GBEAN_ATTR_CLUSTER_NAME, 
+                GBEAN_ATTR_CLUSTER_URI,
+                GBEAN_ATTR_INACTIVE_TIME, 
+                GBEAN_REF_NODE });
+        
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java?view=auto&rev=446624
==============================================================================
--- geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java (added)
+++ geronimo/server/trunk/modules/geronimo-clustering-wadi/src/main/java/org/apache/geronimo/clustering/wadi/BasicReplicaStorageFactoryGBean.java Fri Sep 15 08:02:12 2006
@@ -0,0 +1,48 @@
+package org.apache.geronimo.clustering.wadi;
+
+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.codehaus.wadi.group.Dispatcher;
+import org.codehaus.wadi.replication.storage.ReplicaStorage;
+import org.codehaus.wadi.replication.storage.ReplicaStorageFactory;
+import org.codehaus.wadi.replication.storage.basic.BasicReplicaStorageFactory;
+
+public class BasicReplicaStorageFactoryGBean implements ReplicaStorageFactory, GBeanLifecycle {
+    private BasicReplicaStorageFactory storageFactory;
+    
+    public ReplicaStorage factory(Dispatcher dispatcher) {
+        return storageFactory.factory(dispatcher);
+    }
+
+    public void doFail() {
+        storageFactory = null;
+    }
+
+    public void doStart() throws Exception {
+        storageFactory = new BasicReplicaStorageFactory();
+    }
+
+    public void doStop() throws Exception {
+        storageFactory = null;
+    }
+
+    
+    public static final GBeanInfo GBEAN_INFO;
+    
+    static {
+        GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(BasicReplicaStorageFactoryGBean.class, 
+                NameFactory.GERONIMO_SERVICE);
+        
+        infoBuilder.addInterface(ReplicaStorageFactory.class);
+        
+        infoBuilder.setConstructor(new String[0]);
+        
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+    
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+}



Mime
View raw message