You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gd...@apache.org on 2008/01/16 13:48:43 UTC

svn commit: r612439 [1/2] - in /geronimo/server/trunk: assemblies/geronimo-jetty6-javaee5/ assemblies/geronimo-tomcat6-javaee5/ plugins/clustering/ plugins/clustering/clustering/ plugins/clustering/clustering/src/main/plan/ plugins/clustering/clusterin...

Author: gdamour
Date: Wed Jan 16 04:48:37 2008
New Revision: 612439

URL: http://svn.apache.org/viewvc?rev=612439&view=rev
Log:
Move farm related classes to new sub-project geronimo-farm. Add a new 
configuration "farming" and move farming related GBeans from the clustering
config. to this new one. Also, by default this configuration is not started.

Added:
    geronimo/server/trunk/plugins/clustering/farming/
    geronimo/server/trunk/plugins/clustering/farming/LICENSE.txt
    geronimo/server/trunk/plugins/clustering/farming/NOTICE.txt
    geronimo/server/trunk/plugins/clustering/farming/pom.xml
    geronimo/server/trunk/plugins/clustering/farming/src/
    geronimo/server/trunk/plugins/clustering/farming/src/main/
    geronimo/server/trunk/plugins/clustering/farming/src/main/plan/
    geronimo/server/trunk/plugins/clustering/farming/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/clustering/farming/src/main/resources/
    geronimo/server/trunk/plugins/clustering/farming/src/main/resources/cluster-repository/
    geronimo/server/trunk/plugins/clustering/farming/src/main/resources/cluster-repository/EMPTY
    geronimo/server/trunk/plugins/clustering/farming/src/main/resources/master-repository/
    geronimo/server/trunk/plugins/clustering/farming/src/main/resources/master-repository/EMPTY
    geronimo/server/trunk/plugins/clustering/geronimo-farm/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/LICENSE.txt
    geronimo/server/trunk/plugins/clustering/geronimo-farm/NOTICE.txt
    geronimo/server/trunk/plugins/clustering/geronimo-farm/pom.xml
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicClusterInfo.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfo.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfoEditor.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicNodeInfo.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ClusterInfo.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ExtendedJMXConnectorInfo.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/NodeInfo.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationController.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStoreClient.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicSlaveConfigurationNameBuilder.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/ClusterConfigurationController.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/ClusterConfigurationStore.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/ClusterConfigurationStoreClient.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/DirectoryPackager.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/MasterConfigurationStore.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/SlaveConfigurationNameBuilder.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/ZipDirectoryPackager.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/farm/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/farm/deployment/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationControllerTest.java
      - copied, changed from r612336, geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/test/java/org/apache/geronimo/clustering/deployment/BasicClusterConfigurationControllerTest.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStoreClientTest.java
      - copied, changed from r612336, geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/test/java/org/apache/geronimo/clustering/deployment/BasicClusterConfigurationStoreClientTest.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStoreTest.java
      - copied, changed from r612336, geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/test/java/org/apache/geronimo/clustering/deployment/BasicClusterConfigurationStoreTest.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/farm/deployment/BasicMasterConfigurationNameBuilderTest.java
      - copied, changed from r612336, geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/test/java/org/apache/geronimo/clustering/deployment/BasicMasterConfigurationNameBuilderTest.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/farm/deployment/MasterConfigurationStoreTest.java
      - copied, changed from r612336, geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/test/java/org/apache/geronimo/clustering/deployment/MasterConfigurationStoreTest.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/java/org/apache/geronimo/farm/deployment/ZipDirectoryPackagerTest.java
      - copied, changed from r612336, geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/test/java/org/apache/geronimo/clustering/deployment/ZipDirectoryPackagerTest.java
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/resources/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/resources/folderToZip/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/resources/folderToZip/folder1/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/resources/folderToZip/folder1/file1
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/resources/folderToZip/folder1/file2
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/resources/folderToZip/folder2/
    geronimo/server/trunk/plugins/clustering/geronimo-farm/src/test/resources/folderToZip/folder2/file1
Removed:
    geronimo/server/trunk/plugins/clustering/clustering/src/main/resources/
    geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/config/
    geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/main/java/org/apache/geronimo/clustering/deployment/
    geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/test/java/org/
    geronimo/server/trunk/plugins/clustering/geronimo-clustering/src/test/resources/folderToZip/
Modified:
    geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml
    geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml
    geronimo/server/trunk/plugins/clustering/clustering/pom.xml
    geronimo/server/trunk/plugins/clustering/clustering/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/clustering/pom.xml

Modified: geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml?rev=612439&r1=612438&r2=612439&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml Wed Jan 16 04:48:37 2008
@@ -49,6 +49,13 @@
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>farming</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>transformer-agent</artifactId>
             <version>${version}</version>
             <type>car</type>
@@ -85,6 +92,20 @@
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>openejb</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>openejb-clustering-wadi</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>openejb-clustering-builder-wadi</artifactId>
             <version>${version}</version>
             <type>car</type>
         </dependency>

Modified: geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml?rev=612439&r1=612438&r2=612439&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml Wed Jan 16 04:48:37 2008
@@ -49,6 +49,13 @@
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>farming</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>transformer-agent</artifactId>
             <version>${version}</version>
             <type>car</type>

Modified: geronimo/server/trunk/plugins/clustering/clustering/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/clustering/pom.xml?rev=612439&r1=612438&r2=612439&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/clustering/clustering/pom.xml (original)
+++ geronimo/server/trunk/plugins/clustering/clustering/pom.xml Wed Jan 16 04:48:37 2008
@@ -85,18 +85,12 @@
                     <category>Clustering</category>
                     <instance>
                         <plugin-artifact>
-                            <copy-file relative-to="geronimo" dest-dir="">cluster-repository</copy-file>
-                            <copy-file relative-to="geronimo" dest-dir="">master-repository</copy-file>
                             <config-xml-content>
                                 <gbean name="Node">
                                     <attribute name="nodeName">#{clusterNodeName}</attribute>
                                 </gbean>
-                                <gbean name="ClusterInfo">
-                                    <attribute name="name">#{clusterName}</attribute>
-                                </gbean>
                             </config-xml-content>
                             <config-substitution key="clusterNodeName">NODE</config-substitution>
-                            <config-substitution key="clusterName">CLUSTER_NAME</config-substitution>
                         </plugin-artifact>
                     </instance>
                 </configuration>

Modified: geronimo/server/trunk/plugins/clustering/clustering/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/clustering/src/main/plan/plan.xml?rev=612439&r1=612438&r2=612439&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/clustering/clustering/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/clustering/clustering/src/main/plan/plan.xml Wed Jan 16 04:48:37 2008
@@ -27,78 +27,4 @@
         </reference>
     </gbean>
 
-    <gbean name="MasterRepository" class="org.apache.geronimo.system.repository.Maven2Repository">
-        <attribute name="root">master-repository/</attribute>
-        <reference name="ServerInfo">
-            <name>ServerInfo</name>
-        </reference>
-    </gbean>
-
-    <gbean name="MasterConfigurationStore" class="org.apache.geronimo.clustering.deployment.MasterConfigurationStore">
-        <xml-attribute name="defaultEnvironment">
-            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
-                <dependencies>
-                    <dependency>
-                        <groupId>${pom.groupId}</groupId>
-                        <artifactId>clustering</artifactId>
-                        <type>car</type>
-                    </dependency>
-                </dependencies>
-            </environment>
-        </xml-attribute>
-        <reference name="Repository">
-            <name>MasterRepository</name>
-        </reference>
-        <reference name="ClusterInfo">
-            <name>ClusterInfo</name>
-        </reference>
-        <reference name="ClusterConfigurationStoreClient">
-            <name>ClusterConfigurationStoreClient</name>
-        </reference>
-    </gbean>
-
-    <gbean name="ClusterConfigurationStoreClient" class="org.apache.geronimo.clustering.deployment.BasicClusterConfigurationStoreClient">
-        <attribute name="clusterConfigurationStoreNameQuery">?name=ClusterConfigurationStore</attribute>
-    </gbean>
-
-    <gbean name="ClusterRepository" class="org.apache.geronimo.system.repository.Maven2Repository">
-        <attribute name="root">cluster-repository/</attribute>
-        <reference name="ServerInfo">
-            <name>ServerInfo</name>
-        </reference>
-    </gbean>
-
-    <gbean name="ClusterStore" class="org.apache.geronimo.system.configuration.RepositoryConfigurationStore">
-        <reference name="Repository">
-            <name>ClusterRepository</name>
-        </reference>
-    </gbean>
-
-    <gbean name="ClusterConfigurationStore" class="org.apache.geronimo.clustering.deployment.BasicClusterConfigurationStore">
-        <reference name="ConfigurationStore">
-            <name>ClusterStore</name>
-        </reference>
-    </gbean>
-
-    <!-- Static Cluster Configuration -->
-    <gbean name="ClusterInfo" class="org.apache.geronimo.clustering.config.BasicClusterInfo">
-        <attribute name="name">${PlanClusterName}</attribute>
-        <reference name="NodeInfos"></reference>
-    </gbean>
-
-    <gbean name="NodeInfo" class="org.apache.geronimo.clustering.config.BasicNodeInfo">
-          <attribute name="name">NodeName</attribute>
-          <xml-attribute name="extendedJMXConnectorInfo">
-              <ns:javabean xmlns:ns="http://geronimo.apache.org/xml/ns/deployment/javabean-1.0" class="org.apache.geronimo.clustering.config.BasicExtendedJMXConnectorInfo">
-                  <ns:property name="username">system</ns:property>
-                  <ns:property name="password">manager</ns:property>
-                  <ns:property name="protocol">rmi</ns:property>
-                  <ns:property name="host">localhost</ns:property>
-                  <ns:property name="port">1099</ns:property>
-                  <ns:property name="urlPath">JMXConnector</ns:property>
-                  <ns:property name="local">true</ns:property>
-              </ns:javabean>
-          </xml-attribute>
-      </gbean>
-
 </module>

Added: geronimo/server/trunk/plugins/clustering/farming/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/farming/LICENSE.txt?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/farming/LICENSE.txt (added)
+++ geronimo/server/trunk/plugins/clustering/farming/LICENSE.txt Wed Jan 16 04:48:37 2008
@@ -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/plugins/clustering/farming/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/farming/NOTICE.txt?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/farming/NOTICE.txt (added)
+++ geronimo/server/trunk/plugins/clustering/farming/NOTICE.txt Wed Jan 16 04:48:37 2008
@@ -0,0 +1,6 @@
+Apache Geronimo 
+Copyright 2003-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Added: geronimo/server/trunk/plugins/clustering/farming/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/farming/pom.xml?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/farming/pom.xml (added)
+++ geronimo/server/trunk/plugins/clustering/farming/pom.xml Wed Jan 16 04:48:37 2008
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 609072 $ $Date: 2008-01-05 11:47:14 +1100 (Sat, 05 Jan 2008) $ -->
+
+<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>2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>farming</artifactId>
+    <name>Geronimo Configs :: Farming</name>
+    <packaging>car</packaging>
+
+    <description>
+        Basic farming support
+    </description>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>geronimo-gbean-deployer</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>plugin</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-server</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-security</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-farm</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.plugins</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <configuration>
+                    <useMavenDependencies>
+                        <value>true</value>
+                        <includeVersion>true</includeVersion>
+                    </useMavenDependencies>
+                    <category>Clustering</category>
+                    <instance>
+                        <plugin-artifact>
+                            <copy-file relative-to="geronimo" dest-dir="">cluster-repository</copy-file>
+                            <copy-file relative-to="geronimo" dest-dir="">master-repository</copy-file>
+                            <config-xml-content load="false">
+                                <gbean name="NodeInfo">
+                                    <attribute name="name">#{clusterNodeName}</attribute>
+                                </gbean>
+                                <gbean name="ClusterInfo">
+                                    <attribute name="name">#{clusterName}</attribute>
+                                </gbean>
+                            </config-xml-content>
+                            <config-substitution key="clusterNodeName">NODE</config-substitution>
+                            <config-substitution key="clusterName">CLUSTER_NAME</config-substitution>
+                        </plugin-artifact>
+                    </instance>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: geronimo/server/trunk/plugins/clustering/farming/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/farming/src/main/plan/plan.xml?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/farming/src/main/plan/plan.xml (added)
+++ geronimo/server/trunk/plugins/clustering/farming/src/main/plan/plan.xml Wed Jan 16 04:48:37 2008
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Rev: 594117 $ $Date: 2007-11-13 00:35:48 +1100 (Tue, 13 Nov 2007) $ -->
+
+<module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
+
+    <gbean name="MasterRepository" class="org.apache.geronimo.system.repository.Maven2Repository">
+        <attribute name="root">master-repository/</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+    </gbean>
+
+    <gbean name="MasterConfigurationStore" class="org.apache.geronimo.farm.deployment.MasterConfigurationStore">
+        <xml-attribute name="defaultEnvironment">
+            <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
+                <dependencies>
+                    <dependency>
+                        <groupId>${pom.groupId}</groupId>
+                        <artifactId>clustering</artifactId>
+                        <type>car</type>
+                    </dependency>
+                </dependencies>
+            </environment>
+        </xml-attribute>
+        <reference name="Repository">
+            <name>MasterRepository</name>
+        </reference>
+        <reference name="ClusterInfo">
+            <name>ClusterInfo</name>
+        </reference>
+        <reference name="ClusterConfigurationStoreClient">
+            <name>ClusterConfigurationStoreClient</name>
+        </reference>
+    </gbean>
+
+    <gbean name="ClusterConfigurationStoreClient" class="org.apache.geronimo.farm.deployment.BasicClusterConfigurationStoreClient">
+        <attribute name="clusterConfigurationStoreNameQuery">?name=ClusterConfigurationStore</attribute>
+    </gbean>
+
+    <gbean name="ClusterRepository" class="org.apache.geronimo.system.repository.Maven2Repository">
+        <attribute name="root">cluster-repository/</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+    </gbean>
+
+    <gbean name="ClusterStore" class="org.apache.geronimo.system.configuration.RepositoryConfigurationStore">
+        <reference name="Repository">
+            <name>ClusterRepository</name>
+        </reference>
+    </gbean>
+
+    <gbean name="ClusterConfigurationStore" class="org.apache.geronimo.farm.deployment.BasicClusterConfigurationStore">
+        <reference name="ConfigurationStore">
+            <name>ClusterStore</name>
+        </reference>
+    </gbean>
+
+    <!-- Static Cluster Configuration -->
+    <gbean name="ClusterInfo" class="org.apache.geronimo.farm.config.BasicClusterInfo">
+        <attribute name="name">${PlanClusterName}</attribute>
+        <reference name="NodeInfos"></reference>
+    </gbean>
+
+    <gbean name="NodeInfo" class="org.apache.geronimo.farm.config.BasicNodeInfo">
+          <attribute name="name">${PlanClusterNodeName}</attribute>
+          <xml-attribute name="extendedJMXConnectorInfo">
+              <ns:javabean xmlns:ns="http://geronimo.apache.org/xml/ns/deployment/javabean-1.0" class="org.apache.geronimo.farm.config.BasicExtendedJMXConnectorInfo">
+                  <ns:property name="username">system</ns:property>
+                  <ns:property name="password">manager</ns:property>
+                  <ns:property name="protocol">rmi</ns:property>
+                  <ns:property name="host">localhost</ns:property>
+                  <ns:property name="port">1099</ns:property>
+                  <ns:property name="urlPath">JMXConnector</ns:property>
+                  <ns:property name="local">true</ns:property>
+              </ns:javabean>
+          </xml-attribute>
+      </gbean>
+
+</module>

Added: geronimo/server/trunk/plugins/clustering/farming/src/main/resources/cluster-repository/EMPTY
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/farming/src/main/resources/cluster-repository/EMPTY?rev=612439&view=auto
==============================================================================
    (empty)

Added: geronimo/server/trunk/plugins/clustering/farming/src/main/resources/master-repository/EMPTY
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/farming/src/main/resources/master-repository/EMPTY?rev=612439&view=auto
==============================================================================
    (empty)

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/LICENSE.txt?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/LICENSE.txt (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/LICENSE.txt Wed Jan 16 04:48:37 2008
@@ -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/plugins/clustering/geronimo-farm/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/NOTICE.txt?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/NOTICE.txt (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/NOTICE.txt Wed Jan 16 04:48:37 2008
@@ -0,0 +1,6 @@
+Apache Geronimo 
+Copyright 2003-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/pom.xml?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/pom.xml (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/pom.xml Wed Jan 16 04:48:37 2008
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 589641 $ $Date: 2007-10-29 10:43:01 -0400 (Mon, 29 Oct 2007) $ -->
+
+<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>2.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>geronimo-farm</artifactId>
+    <name>Geronimo Modules :: Farm</name>
+    
+    <dependencies>
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-deploy-jsr88</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-j2ee</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-jmx-remoting</artifactId>
+            <version>${version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>geronimo-service-builder</artifactId>
+            <version>${version}</version>
+        </dependency>
+    </dependencies>
+    
+</project>
+

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicClusterInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicClusterInfo.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicClusterInfo.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicClusterInfo.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.config;
+
+import java.util.Collection;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public class BasicClusterInfo implements ClusterInfo {
+    private final String name;
+    private final Collection<NodeInfo> nodes;
+
+    public BasicClusterInfo(String name, Collection<NodeInfo> nodes) {
+        if (null == name) {
+            throw new IllegalArgumentException("name is required");
+        } else if (null == nodes) {
+            throw new IllegalArgumentException("nodes is required");
+        }
+        this.name = name;
+        this.nodes = nodes;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Collection<NodeInfo> getNodeInfos() {
+        return nodes;
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    public static final String GBEAN_J2EE_TYPE = "ClusterInfo";
+    public static final String GBEAN_ATTR_CLUSTER_NAME = "name";
+    public static final String GBEAN_REF_NODE_INFOS = "NodeInfos";
+    
+    static {
+        GBeanInfoBuilder builder = GBeanInfoBuilder.createStatic(BasicClusterInfo.class, GBEAN_J2EE_TYPE);
+        builder.addAttribute(GBEAN_ATTR_CLUSTER_NAME, String.class, true);
+        builder.addReference(GBEAN_REF_NODE_INFOS, NodeInfo.class, "NodeInfo");
+        builder.addInterface(ClusterInfo.class);
+        builder.setConstructor(new String[]{GBEAN_ATTR_CLUSTER_NAME, GBEAN_REF_NODE_INFOS});
+        GBEAN_INFO = builder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+    
+}

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfo.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfo.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfo.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.config;
+
+import java.io.Serializable;
+import java.net.InetSocketAddress;
+
+import org.apache.geronimo.deployment.service.DoNotPersist;
+import org.apache.geronimo.deployment.service.EncryptOnPersist;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public class BasicExtendedJMXConnectorInfo implements ExtendedJMXConnectorInfo, Serializable {
+    private String username;
+    private String password;
+    private String protocol;
+    private String host;
+    private int port = -1;
+    private String urlPath;
+    private boolean local;
+    
+    public String getHost() {
+        return host;
+    }
+
+    @DoNotPersist
+    public InetSocketAddress getListenAddress() {
+        return new InetSocketAddress(host, port);
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public String getUrlPath() {
+        return urlPath;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public void setPort(int port) {
+        this.port = port;
+    }
+
+    public void setProtocol(String protocol) {
+        this.protocol = protocol;
+    }
+
+    public void setUrlPath(String urlPath) {
+        this.urlPath = urlPath;
+    }
+
+    @EncryptOnPersist
+    public String getPassword() {
+        return password;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public boolean isLocal() {
+        return local;
+    }
+
+    public void setLocal(boolean local) {
+        this.local = local;
+    }
+
+}

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfoEditor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfoEditor.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfoEditor.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicExtendedJMXConnectorInfoEditor.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.config;
+
+import org.apache.geronimo.deployment.service.JavaBeanXmlAttributeEditor;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public class BasicExtendedJMXConnectorInfoEditor extends JavaBeanXmlAttributeEditor {
+
+    public BasicExtendedJMXConnectorInfoEditor() {
+        super(BasicExtendedJMXConnectorInfo.class);
+    }
+
+}

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicNodeInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicNodeInfo.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicNodeInfo.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/BasicNodeInfo.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.config;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.MBeanServerConnection;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.system.jmx.KernelDelegate;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public class BasicNodeInfo implements NodeInfo {
+    private final String name;
+    private final ExtendedJMXConnectorInfo connectorInfo;
+    private final Kernel kernel;
+
+    public BasicNodeInfo(Kernel kernel, String name, ExtendedJMXConnectorInfo connectorInfo) {
+        if (null == kernel) {
+            throw new IllegalArgumentException("kernel is required");
+        } else if (null == name) {
+            throw new IllegalArgumentException("name is required");
+        } else if (null == connectorInfo) {
+            throw new IllegalArgumentException("connectorInfo is required");
+        }
+        this.kernel = kernel;
+        this.name = name;
+        this.connectorInfo = connectorInfo;
+    }
+    
+    public String getName() {
+        return name;
+    }
+
+    public ExtendedJMXConnectorInfo getConnectorInfo() {
+        return connectorInfo;
+    }
+
+    public Kernel newKernel() throws IOException {
+        if (connectorInfo.isLocal()) {
+            return kernel;
+        }
+        
+        String url = "service:jmx:rmi://" + connectorInfo.getHost() + "/jndi/"
+                        + connectorInfo.getProtocol() + "://" + connectorInfo.getHost() + ":"
+                        + connectorInfo.getPort() + "/" + connectorInfo.getUrlPath();
+
+        Map environment = new HashMap();
+        environment.put("jmx.remote.credentials",
+            new String[] {connectorInfo.getUsername(), connectorInfo.getPassword()});
+
+        return newKernel(url, environment);
+    }
+
+    protected Kernel newKernel(String url, Map environment) throws IOException {
+        JMXConnector jmxConnector = JMXConnectorFactory.connect(new JMXServiceURL(url), environment);
+        MBeanServerConnection mbServerConnection = jmxConnector.getMBeanServerConnection();
+        return new KernelDelegate(mbServerConnection);
+    }
+    
+    public static final GBeanInfo GBEAN_INFO;
+
+    public static final String GBEAN_J2EE_TYPE = "NodeInfo";
+    public static final String GBEAN_ATTR_KERNEL = "kernel";
+    public static final String GBEAN_ATTR_NODE_NAME = "name";
+    public static final String GBEAN_ATTR_EXT_JMX_CONN_INFO = "extendedJMXConnectorInfo";
+    static {
+        GBeanInfoBuilder builder = GBeanInfoBuilder.createStatic(BasicNodeInfo.class, GBEAN_J2EE_TYPE);
+
+        builder.addAttribute(GBEAN_ATTR_KERNEL, Kernel.class, false);
+        builder.addAttribute(GBEAN_ATTR_NODE_NAME, String.class, true);
+        builder.addAttribute(GBEAN_ATTR_EXT_JMX_CONN_INFO, ExtendedJMXConnectorInfo.class, true);
+        
+        builder.addInterface(NodeInfo.class);
+        
+        builder.setConstructor(new String[]{GBEAN_ATTR_KERNEL,
+            GBEAN_ATTR_NODE_NAME,
+            GBEAN_ATTR_EXT_JMX_CONN_INFO});
+
+        GBEAN_INFO = builder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ClusterInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ClusterInfo.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ClusterInfo.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ClusterInfo.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.config;
+
+import java.util.Collection;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public interface ClusterInfo {
+    String getName();
+
+    Collection<NodeInfo> getNodeInfos();
+}
\ No newline at end of file

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ExtendedJMXConnectorInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ExtendedJMXConnectorInfo.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ExtendedJMXConnectorInfo.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/ExtendedJMXConnectorInfo.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.config;
+
+import java.io.Serializable;
+
+import org.apache.geronimo.jmxremoting.JMXConnectorInfo;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public interface ExtendedJMXConnectorInfo extends JMXConnectorInfo, Serializable {
+    String getUsername();
+    
+    void setUsername(String username);
+    
+    String getPassword();
+    
+    void setPassword(String password);
+    
+    boolean isLocal();
+
+    void setLocal(boolean local);
+}

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/NodeInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/NodeInfo.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/NodeInfo.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/config/NodeInfo.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.config;
+
+import java.io.IOException;
+
+import org.apache.geronimo.kernel.Kernel;
+
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public interface NodeInfo {
+    String getName();
+
+    ExtendedJMXConnectorInfo getConnectorInfo();
+    
+    Kernel newKernel() throws IOException;
+}
\ No newline at end of file

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationController.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationController.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationController.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationController.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.deployment;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.farm.config.ClusterInfo;
+import org.apache.geronimo.farm.config.NodeInfo;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.config.ConfigurationManager;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public class BasicClusterConfigurationController implements GBeanLifecycle, ClusterConfigurationController {
+    private static final Log log = LogFactory.getLog(BasicClusterConfigurationController.class);
+    
+    private final ClusterInfo clusterInfo;
+    private final String nodeName;
+    private final Artifact artifact;
+    private boolean startConfigurationUponStart;
+    private boolean ignoreStartConfigurationFailureUponStart;
+
+    public BasicClusterConfigurationController(ClusterInfo clusterInfo,
+            String nodeName,
+            Artifact artifact,
+            boolean startConfigurationUponStart,
+            boolean ignoreStartConfigurationFailureUponStart) {
+        if (null == clusterInfo) {
+            throw new IllegalArgumentException("clusterInfo is required");
+        } else if (null == nodeName) {
+            throw new IllegalArgumentException("nodeName is required");
+        } else if (null == artifact) {
+            throw new IllegalArgumentException("artifact is required");
+        }
+        this.clusterInfo = clusterInfo;
+        this.nodeName = nodeName;
+        this.artifact = artifact;
+        this.startConfigurationUponStart = startConfigurationUponStart;
+        this.ignoreStartConfigurationFailureUponStart = ignoreStartConfigurationFailureUponStart;
+    }
+
+    public void doStart() throws Exception {
+        if (startConfigurationUponStart) {
+            try {
+                startConfiguration();
+            } catch (Exception e) {
+                if (ignoreStartConfigurationFailureUponStart) {
+                    log.info("Exception while starting configuration [" + artifact + "] on [" + nodeName
+                        + "]. Ignoring.", e);
+                } else {
+                    log.error("Exception while starting configuration [" + artifact + "] on [" + nodeName + "].", e);
+                    throw e;
+                }
+            }
+        }
+    }
+    
+    public void doFail() {
+        try {
+            stopConfiguration();
+        } catch (Exception e) {
+            log.error("Exception while stopping configuration [" + artifact + "] on [" + nodeName + "].", e);
+        }
+    }
+
+    public void doStop() throws Exception {
+        try {
+            stopConfiguration();
+        } catch (Exception e) {
+            log.error("Exception while stopping configuration [" + artifact + "] on [" + nodeName + "].", e);
+            throw e;
+        }
+    }
+
+    public void startConfiguration() throws Exception {
+        for (NodeInfo nodeInfo : clusterInfo.getNodeInfos()) {
+            if (!nodeInfo.getName().equals(nodeName)) {
+                continue;
+            }
+            
+            Kernel kernel = nodeInfo.newKernel();
+            
+            ConfigurationManager configurationManager = newConfigurationManager(kernel);
+            if (!configurationManager.isLoaded(artifact)) {
+                configurationManager.loadConfiguration(artifact);
+            }
+            configurationManager.startConfiguration(artifact);
+        }
+    }
+
+    public void stopConfiguration() throws Exception {
+        for (NodeInfo nodeInfo : clusterInfo.getNodeInfos()) {
+            if (!nodeInfo.getName().equals(nodeName)) {
+                continue;
+            }
+            
+            Kernel kernel = nodeInfo.newKernel();
+            
+            ConfigurationManager configurationManager = newConfigurationManager(kernel);
+            configurationManager.stopConfiguration(artifact);
+        }
+    }
+    
+    protected ConfigurationManager newConfigurationManager(Kernel kernel) {
+        return ConfigurationUtil.getConfigurationManager(kernel);
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    public static final String GBEAN_J2EE_TYPE = "ClusterConfigurationController";
+    public static final String GBEAN_ATTR_NODE_NAME = "nodeName";
+    public static final String GBEAN_ATTR_ARTIFACT = "artifact";
+    public static final String GBEAN_ATTR_START_CONF_UPON_START= "startConfigurationUponStart";
+    public static final String GBEAN_ATTR_IGNORE_START_CONF_FAIL_UPON_START= "ignoreStartConfigurationFailureUponStart";
+    public static final String GBEAN_REF_CLUSTER_INFO = "ClusterInfo";
+    
+    static {
+        GBeanInfoBuilder builder = GBeanInfoBuilder.createStatic(BasicClusterConfigurationController.class, GBEAN_J2EE_TYPE);
+        
+        builder.addAttribute(GBEAN_ATTR_NODE_NAME, String.class, true);
+        builder.addAttribute(GBEAN_ATTR_ARTIFACT, Artifact.class, true);
+        builder.addAttribute(GBEAN_ATTR_START_CONF_UPON_START, boolean.class, true);
+        builder.addAttribute(GBEAN_ATTR_IGNORE_START_CONF_FAIL_UPON_START, boolean.class, true);
+
+        builder.addReference(GBEAN_REF_CLUSTER_INFO, ClusterInfo.class);
+        
+        builder.addInterface(ClusterConfigurationController.class);
+
+        builder.setConstructor(new String[] {GBEAN_REF_CLUSTER_INFO,
+            GBEAN_ATTR_NODE_NAME,
+            GBEAN_ATTR_ARTIFACT,
+            GBEAN_ATTR_START_CONF_UPON_START,
+            GBEAN_ATTR_IGNORE_START_CONF_FAIL_UPON_START});
+
+        GBEAN_INFO = builder.getBeanInfo();
+    }
+    
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+    
+}

Added: geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java?rev=612439&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java (added)
+++ geronimo/server/trunk/plugins/clustering/geronimo-farm/src/main/java/org/apache/geronimo/farm/deployment/BasicClusterConfigurationStore.java Wed Jan 16 04:48:37 2008
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.geronimo.farm.deployment;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.config.IOUtil;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+/**
+ *
+ * @version $Rev:$ $Date:$
+ */
+public class BasicClusterConfigurationStore implements ClusterConfigurationStore {
+    private final ConfigurationStore actualConfigurationStore;
+    
+    public BasicClusterConfigurationStore(ConfigurationStore actualConfigurationStore) {
+        if (null == actualConfigurationStore) {
+            throw new IllegalArgumentException("actualConfigurationStore is required");
+        }
+        this.actualConfigurationStore = actualConfigurationStore;
+    }
+
+    public void install(ConfigurationData configurationData, File packedConfigurationDir)
+            throws IOException, InvalidConfigException {
+        try {
+            File configurationDir = actualConfigurationStore.createNewConfigurationDir(configurationData.getId());
+
+            DirectoryPackager directoryPackager = newDirectoryPackager();
+            directoryPackager.unpack(configurationDir, packedConfigurationDir);
+            configurationData.setConfigurationDir(configurationDir);
+            
+            actualConfigurationStore.install(configurationData);
+        } finally {
+            deleteDir(packedConfigurationDir);
+        }
+    }
+
+    public void uninstall(Artifact configId) throws NoSuchConfigException, IOException {
+        actualConfigurationStore.uninstall(configId);
+    }
+
+    protected void deleteDir(File packedConfigurationDir) {
+        IOUtil.recursiveDelete(packedConfigurationDir);
+    }
+
+    protected DirectoryPackager newDirectoryPackager() {
+        return new ZipDirectoryPackager();
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    public static final String GBEAN_J2EE_TYPE = "ClusterConfigurationStore";
+    public static final String GBEAN_REF_CONF_STORE = "ConfigurationStore";
+
+    static {
+        GBeanInfoBuilder builder = GBeanInfoBuilder.createStatic(BasicClusterConfigurationStore.class, GBEAN_J2EE_TYPE);
+        
+        builder.addReference(GBEAN_REF_CONF_STORE, ConfigurationStore.class, "ConfigurationStore");
+        
+        builder.addInterface(ClusterConfigurationStore.class);
+        
+        builder.setConstructor(new String[]{GBEAN_REF_CONF_STORE});
+        
+        GBEAN_INFO = builder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}



Re: svn commit: r612439 [1/2] - in /geronimo/server/trunk: assemblies/geronimo-jetty6-javaee5/ assemblies/geronimo-tomcat6-javaee5/ plugins/clustering/ plugins/clustering/clustering/ plugins/clustering/clustering/src/main/plan/ plugins/clustering/clusterin...

Posted by Gianny Damour <gi...@optusnet.com.au>.
On 17/01/2008, at 9:01 AM, Kevan Miller wrote:

>>
>>
>> I am now integration testing the OpenEJB clustering support and it  
>> appears I will need to do some minor adjustments. As part of the  
>> change, four sub-projects/dependencies are added: geronimo-openejb- 
>> clustering-wadi, geronimo-openejb-clustering-builder-wadi, openejb- 
>> clustering-wadi and openejb-clustering-builder-wadi. This  
>> structure mirrors the Jetty and Tomcat ones.
>>
>> I also think 2.1 is belated and should be cut as soon as possible.  
>> I will hold-on the OpenEJB commit till the creation of a 2.1 branch.
>
> Cool. If this branch isn't for another week or two, is that going  
> to ok for you? I think we want to avoid creating branches/2.1 and  
> then merging a bunch of fit-and-finish fixes between the branch and  
> trunk...

No worries. Also I agree it is quite a pain to port change sets from  
branches to trunk.

Thanks,
Gianny


Re: svn commit: r612439 [1/2] - in /geronimo/server/trunk: assemblies/geronimo-jetty6-javaee5/ assemblies/geronimo-tomcat6-javaee5/ plugins/clustering/ plugins/clustering/clustering/ plugins/clustering/clustering/src/main/plan/ plugins/clustering/clusterin...

Posted by Kevan Miller <ke...@gmail.com>.
Thanks Gianny. More below...

On Jan 16, 2008, at 3:42 PM, Gianny Damour wrote:

> On 17/01/2008, at 1:30 AM, Kevan Miller wrote:
>
>>
>> On Jan 16, 2008, at 7:48 AM, gdamour@apache.org wrote:
>>
>>> Author: gdamour
>>> Date: Wed Jan 16 04:48:37 2008
>>> New Revision: 612439
>>>
>>> URL: http://svn.apache.org/viewvc?rev=612439&view=rev
>>> Log:
>>> Move farm related classes to new sub-project geronimo-farm. Add a  
>>> new
>>> configuration "farming" and move farming related GBeans from the  
>>> clustering
>>> config. to this new one. Also, by default this configuration is  
>>> not started.
>>
>> Cool. Gianny, can you give us a bit of status about where you are  
>> with this? Looks like you're laying some groundwork for OpenEJB  
>> dependencies...
> Hi,
>
> David J. proposed a while back two clustering code/module  
> rearrangements he was keen to have implemented before 2.1. With this  
> commit, both of these rearrangements are now in.

Right. Although I haven't looked at the specifics, I think this split  
is a really good one.

>
>
> I am now integration testing the OpenEJB clustering support and it  
> appears I will need to do some minor adjustments. As part of the  
> change, four sub-projects/dependencies are added: geronimo-openejb- 
> clustering-wadi, geronimo-openejb-clustering-builder-wadi, openejb- 
> clustering-wadi and openejb-clustering-builder-wadi. This structure  
> mirrors the Jetty and Tomcat ones.
>
> I also think 2.1 is belated and should be cut as soon as possible. I  
> will hold-on the OpenEJB commit till the creation of a 2.1 branch.

Cool. If this branch isn't for another week or two, is that going to  
ok for you? I think we want to avoid creating branches/2.1 and then  
merging a bunch of fit-and-finish fixes between the branch and trunk...

--kevan

>
>
> Thanks,
> Gianny
>
>>
>> Enhanced clustering support is really great to have. Want to  
>> understand what additional dependencies this is going to require.
>>
>> I think we're overdue for a 2.1 release. We have polish and a  
>> number of usability issues to work out in current trunk, prior to  
>> this. However, worried about also pushing in a bunch of new  
>> function is going to make this difficult...
>>
>> --kevan
>


Re: svn commit: r612439 [1/2] - in /geronimo/server/trunk: assemblies/geronimo-jetty6-javaee5/ assemblies/geronimo-tomcat6-javaee5/ plugins/clustering/ plugins/clustering/clustering/ plugins/clustering/clustering/src/main/plan/ plugins/clustering/clusterin...

Posted by Gianny Damour <gi...@optusnet.com.au>.
On 17/01/2008, at 1:30 AM, Kevan Miller wrote:

>
> On Jan 16, 2008, at 7:48 AM, gdamour@apache.org wrote:
>
>> Author: gdamour
>> Date: Wed Jan 16 04:48:37 2008
>> New Revision: 612439
>>
>> URL: http://svn.apache.org/viewvc?rev=612439&view=rev
>> Log:
>> Move farm related classes to new sub-project geronimo-farm. Add a new
>> configuration "farming" and move farming related GBeans from the  
>> clustering
>> config. to this new one. Also, by default this configuration is  
>> not started.
>
> Cool. Gianny, can you give us a bit of status about where you are  
> with this? Looks like you're laying some groundwork for OpenEJB  
> dependencies...
Hi,

David J. proposed a while back two clustering code/module  
rearrangements he was keen to have implemented before 2.1. With this  
commit, both of these rearrangements are now in.

I am now integration testing the OpenEJB clustering support and it  
appears I will need to do some minor adjustments. As part of the  
change, four sub-projects/dependencies are added: geronimo-openejb- 
clustering-wadi, geronimo-openejb-clustering-builder-wadi, openejb- 
clustering-wadi and openejb-clustering-builder-wadi. This structure  
mirrors the Jetty and Tomcat ones.

I also think 2.1 is belated and should be cut as soon as possible. I  
will hold-on the OpenEJB commit till the creation of a 2.1 branch.

Thanks,
Gianny

>
> Enhanced clustering support is really great to have. Want to  
> understand what additional dependencies this is going to require.
>
> I think we're overdue for a 2.1 release. We have polish and a  
> number of usability issues to work out in current trunk, prior to  
> this. However, worried about also pushing in a bunch of new  
> function is going to make this difficult...
>
> --kevan


Re: svn commit: r612439 [1/2] - in /geronimo/server/trunk: assemblies/geronimo-jetty6-javaee5/ assemblies/geronimo-tomcat6-javaee5/ plugins/clustering/ plugins/clustering/clustering/ plugins/clustering/clustering/src/main/plan/ plugins/clustering/clusterin...

Posted by Kevan Miller <ke...@gmail.com>.
On Jan 16, 2008, at 7:48 AM, gdamour@apache.org wrote:

> Author: gdamour
> Date: Wed Jan 16 04:48:37 2008
> New Revision: 612439
>
> URL: http://svn.apache.org/viewvc?rev=612439&view=rev
> Log:
> Move farm related classes to new sub-project geronimo-farm. Add a new
> configuration "farming" and move farming related GBeans from the  
> clustering
> config. to this new one. Also, by default this configuration is not  
> started.

Cool. Gianny, can you give us a bit of status about where you are with  
this? Looks like you're laying some groundwork for OpenEJB  
dependencies...

Enhanced clustering support is really great to have. Want to  
understand what additional dependencies this is going to require.

I think we're overdue for a 2.1 release. We have polish and a number  
of usability issues to work out in current trunk, prior to this.  
However, worried about also pushing in a bunch of new function is  
going to make this difficult...

--kevan