Author: azeez
Date: Thu Dec 18 08:04:50 2008
New Revision: 27310
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=27310

Log:
Clustering changes



Modified:
   
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
   
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/EndpointContext.java
   
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/AlgorithmContext.java
   
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
   
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
   
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
   
branches/synapse/1.2.wso2v1/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
   branches/synapse/1.2.wso2v1/repository/conf/axis2.xml
   
branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/client/axis2.xml
   
branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/server/axis2.xml

Modified: 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
   (original)
+++ 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
   Thu Dec 18 08:04:50 2008
@@ -19,7 +19,7 @@
 
 package org.apache.synapse.endpoints;
 
-import org.apache.axis2.clustering.ClusterManager;
+import org.apache.axis2.clustering.ClusteringAgent;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -147,8 +147,8 @@
     public synchronized void init(ConfigurationContext cc) {
         if (!initialized) {
             // The check for clustering environment
-            ClusterManager clusterManager = 
cc.getAxisConfiguration().getClusterManager();
-            if (clusterManager != null && clusterManager.getContextManager() 
!= null) {
+            ClusteringAgent clusteringAgent = 
cc.getAxisConfiguration().getClusteringAgent();
+            if (clusteringAgent != null && clusteringAgent.getStateManager() 
!= null) {
                 isClusteringEnabled = Boolean.TRUE;
             } else {
                 isClusteringEnabled = Boolean.FALSE;

Modified: 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/EndpointContext.java
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/EndpointContext.java?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/EndpointContext.java
    (original)
+++ 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/EndpointContext.java
    Thu Dec 18 08:04:50 2008
@@ -19,7 +19,7 @@
 package org.apache.synapse.endpoints;
 
 import org.apache.axis2.clustering.ClusteringFault;
-import org.apache.axis2.clustering.context.Replicator;
+import org.apache.axis2.clustering.state.Replicator;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/AlgorithmContext.java
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/AlgorithmContext.java?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/AlgorithmContext.java
        (original)
+++ 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/AlgorithmContext.java
        Thu Dec 18 08:04:50 2008
@@ -19,7 +19,7 @@
 package org.apache.synapse.endpoints.algorithms;
 
 import org.apache.axis2.clustering.ClusteringFault;
-import org.apache.axis2.clustering.context.Replicator;
+import org.apache.axis2.clustering.state.Replicator;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
      (original)
+++ 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
      Thu Dec 18 08:04:50 2008
@@ -21,7 +21,7 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.clustering.ClusteringFault;
-import org.apache.axis2.clustering.context.Replicator;
+import org.apache.axis2.clustering.state.Replicator;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.saaj.util.SAAJUtil;
 import org.apache.synapse.MessageContext;

Modified: 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
       (original)
+++ 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
       Thu Dec 18 08:04:50 2008
@@ -19,20 +19,10 @@
 
 package org.apache.synapse.mediators.builtin;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.synapse.SynapseConstants;
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.synapse.MessageContext;
-import org.apache.synapse.core.axis2.Axis2MessageContext;
 import org.apache.synapse.endpoints.Endpoint;
-import org.apache.synapse.endpoints.SALoadbalanceEndpoint;
 import org.apache.synapse.mediators.AbstractMediator;
-import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.clustering.ClusterManager;
-
-import java.util.List;
-import java.util.Iterator;
 
 /**
  * SendMediator sends a message using specified semantics. If it contains an 
endpoint it will

Modified: 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/util/Replicator.java?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
      (original)
+++ 
branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
      Thu Dec 18 08:04:50 2008
@@ -49,7 +49,7 @@
                 }
 
                 configCtx.removeProperty(key);
-                
org.apache.axis2.clustering.context.Replicator.replicate(configCtx);
+                
org.apache.axis2.clustering.state.Replicator.replicate(configCtx);
 
                 if (log.isDebugEnabled()) {
                     log.debug("Completed replication of the property removal 
with key : " + key);
@@ -80,7 +80,7 @@
                 }
 
                 configCtx.setProperty(key, value);
-                org.apache.axis2.clustering.context.Replicator.replicate(
+                org.apache.axis2.clustering.state.Replicator.replicate(
                         configCtx, new String[]{key});
 
                 if (log.isDebugEnabled()) {

Modified: 
branches/synapse/1.2.wso2v1/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
    (original)
+++ 
branches/synapse/1.2.wso2v1/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
    Thu Dec 18 08:04:50 2008
@@ -27,9 +27,9 @@
 import org.apache.synapse.core.axis2.Axis2MessageContext;
 import org.apache.synapse.mediators.AbstractMediator;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.clustering.context.Replicator;
+import org.apache.axis2.clustering.state.Replicator;
 import org.apache.axis2.clustering.ClusteringFault;
-import org.apache.axis2.clustering.ClusterManager;
+import org.apache.axis2.clustering.ClusteringAgent;
 import org.wso2.throttle.*;
 
 /**
@@ -99,9 +99,9 @@
             //To ensure check for clustering environment only happens one time
             if ((throttle == null && !isResponse) || (isResponse
                 && concurrentAccessController == null)) {
-                ClusterManager clusterManager = 
cc.getAxisConfiguration().getClusterManager();
-                if (clusterManager != null &&
-                    clusterManager.getContextManager() != null) {
+                ClusteringAgent clusteringAgent = 
cc.getAxisConfiguration().getClusteringAgent();
+                if (clusteringAgent != null &&
+                    clusteringAgent.getStateManager() != null) {
                     isClusteringEnable = true;
                 }
             }

Modified: branches/synapse/1.2.wso2v1/repository/conf/axis2.xml
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/repository/conf/axis2.xml?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- branches/synapse/1.2.wso2v1/repository/conf/axis2.xml       (original)
+++ branches/synapse/1.2.wso2v1/repository/conf/axis2.xml       Thu Dec 18 
08:04:50 2008
@@ -298,12 +298,170 @@
     <!-- ================================================= -->
     <!-- Clustering  -->
     <!-- ================================================= -->
-    <!-- Configure and uncomment following for preparing Synapse to a 
clustered environment -->
-    <!--<cluster 
class="org.apache.axis2.clustering.tribes.TribesClusterManager">
-        <parameter name="AvoidInitiation">false</parameter>
-        <parameter name="domain">apache-synapse.domain</parameter>
-        <contextManager 
class="org.apache.axis2.clustering.context.DefaultContextManager">
-            <listener 
class="org.apache.axis2.clustering.context.DefaultContextManagerListener"/>
+    <!-- Configure the following for preparing Synapse to a clustered 
environment -->
+    <clustering 
class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="false">
+
+        <!--
+           This parameter indicates whther the cluster has to be automatically 
initalized
+           when the AxisConfiguration is built. If set to "true" the 
initialization will not be
+           done at that stage, and some other party will have to explictly 
initialize the cluster.
+        -->
+        <parameter name="AvoidInitiation">true</parameter>
+
+        <!--
+           Indicates whether this member is active or not. This will be useful 
in a setup where
+           members are deployed in ACTIVE and/or PASSIVE configuration
+        -->
+        <parameter name="isActive">true</parameter>
+
+        <!--
+           An implementation of org.apache.axis2.clustering.MembershipListener
+           which will be called on membership changes
+        -->
+        <!--
+        <parameter name="membershipListener">
+            <class>org.apache.axis2.clustering.MembershipListenerImpl</class>
+            <properties>
+                <property name="foo">bar</property>
+            </properties>
+        </parameter>
+        -->
+
+        <!--
+           The membership scheme used in this setup. The only values supported 
at the moment are
+           "multicast" and "wka"
+
+           1. multicast - membership is automatically discovered using 
multicasting
+           2. wka - Well-Known Address based multicasting. Membership is 
discovered with the help
+                    of one or more nodes running at a Well-Known Address. New 
members joining a
+                    cluster will first connect to a well-known node, register 
with the well-known node
+                    and get the membership list from it. When new members 
join, one of the well-known
+                    nodes will notify the others in the group. When a member 
leaves the cluster or
+                    is deemed to have left the cluster, it will be detected by 
the Group Membership
+                    Service (GMS) using a TCP ping mechanism.
+        -->
+        <parameter name="membershipScheme">multicast</parameter>
+
+        <!--
+         The clustering domain/group. Nodes in the same group will belong to 
the same multicast
+         domain. There will not be interference between nodes in different 
groups.
+        -->
+        <parameter name="domain">apache.axis2.domain</parameter>
+
+        <!--
+           When a Web service request is received, and processed, before the 
response is sent to the
+           client, should we update the states of all members in the cluster? 
If the value of
+           this parameter is set to "true", the response to the client will be 
sent only after
+           all the members have been updated. Obviously, this can be time 
consuming. In some cases,
+           such this overhead may not be acceptable, in which case the value 
of this parameter
+           should be set to "false"
+        -->
+        <parameter name="synchronizeAll">true</parameter>
+
+        <!--
+          The maximum number of times we need to retry to send a message to a 
particular node
+          before giving up and considering that node to be faulty
+        -->
+        <parameter name="maxRetries">10</parameter>
+
+        <!-- The multicast address to be used -->
+        <parameter name="mcastAddress">228.0.0.4</parameter>
+
+        <!-- The multicast port to be used -->
+        <parameter name="mcastPort">45564</parameter>
+
+        <!-- The frequency of sending membership multicast messages (in ms) -->
+        <parameter name="mcastFrequency">500</parameter>
+
+        <!-- The time interval within which if a member does not respond, the 
member will be
+         deemed to have left the group (in ms)
+         -->
+        <parameter name="memberDropTime">3000</parameter>
+
+        <!--
+           The IP address of the network interface to which the multicasting 
has to be bound to.
+           Multicasting would be done using this interface.
+        -->
+        <parameter name="mcastBindAddress">127.0.0.1</parameter>
+
+        <!-- The host name or IP address of this member -->
+        <parameter name="localMemberHost">127.0.0.1</parameter>
+
+        <!--
+        The TCP port used by this member. This is the port through which other 
nodes will
+        contact this member
+         -->
+        <parameter name="localMemberPort">4000</parameter>
+
+        <!--
+        Preserve message ordering. This will be done according to sender order.
+        -->
+        <parameter name="preserveMessageOrder">true</parameter>
+
+        <!--
+        Maintain atmost-once message processing semantics
+        -->
+        <parameter name="atmostOnceMessageSemantics">true</parameter>
+
+        <!--
+        Properties specific to this member
+        -->
+        <parameter name="properties">
+            <property name="backendServerURL" 
value="https://${hostName}:${httpsPort}/services/"/>
+            <property name="mgtConsoleURL" 
value="https://${hostName}:${httpsPort}/"/>
+        </parameter>
+
+        <!--
+           The list of static or well-known members. These entries will only 
be valid if the
+           "membershipScheme" above is set to "wka"
+        -->
+        <members>
+            <member>
+                <hostName>127.0.0.1</hostName>
+                <port>4000</port>
+            </member>
+            <member>
+                <hostName>127.0.0.1</hostName>
+                <port>4001</port>
+            </member>
+        </members>
+
+        <!--
+        Enable the load balancer entry if you need to run this node as a load 
balancer.
+        Multiple application domains with different LoadBalanceEventHandler 
implementations
+        can be defined in this section.
+        -->
+        <groupManagement enable="false">
+            <applicationDomain name="apache.axis2.application.domain"
+                               
agent="org.apache.axis2.clustering.DefaultGroupManagementAgent"/>
+        </groupManagement>
+
+        <!--
+           This interface is responsible for handling configuration management.
+           Configuraion changes include:
+
+            1. Rebooting an entire cluster, in which case, all nodes have to 
load the new
+               Axis2 configuration in a consistent manner
+            2. Deploying a new service to a cluster or undeploying a service 
from a cluster
+            3. Changing the policies of a service deployed on the cluster
+
+            The "enable" attribute indicates whether Configuration management 
has been enabled
+        -->
+        <nodeManager 
class="org.apache.axis2.clustering.management.DefaultNodeManager"
+                     enable="true"/>
+
+        <!--
+           This interface is responsible for handling context replication. The 
property changes in
+           the Axis2 context hierarchy in this node, are propagated to all 
other nodes in the cluster.
+
+           The "excludes" patterns can be used to specify the prefixes (e.g. 
local_*) or
+           suffixes (e.g. *_local) of the properties to be excluded from 
replication. The pattern
+           "*" indicates that all properties in a particular context should 
not be replicated.
+
+            The "enable" attribute indicates whether context replication has 
been enabled
+        -->
+        <stateManager 
class="org.apache.axis2.clustering.state.DefaultStateManager"
+                      enable="true">
             <replication>
                 <defaults>
                     <exclude name="local_*"/>
@@ -312,13 +470,6 @@
                 <context class="org.apache.axis2.context.ConfigurationContext">
                     <exclude name="UseAsyncOperations"/>
                     <exclude name="SequencePropertyBeanMap"/>
-                    <exclude name="WORK_DIR"/>
-                    <exclude name="NextMsgBeanMap"/>
-                    <exclude name="RetransmitterBeanMap"/>
-                    <exclude name="StorageMapBeanMap"/>
-                    <exclude name="CreateSequenceBeanMap"/>
-                    <exclude name="ConfigContextTimeoutInterval"/>
-                    <exclude name="ContainerManaged"/>
                 </context>
                 <context class="org.apache.axis2.context.ServiceGroupContext">
                     <exclude name="my.sandesha.*"/>
@@ -327,8 +478,8 @@
                     <exclude name="my.sandesha.*"/>
                 </context>
             </replication>
-        </contextManager>
-    </cluster>-->
+        </stateManager>
+    </clustering>
 
     <!-- ================================================= -->
     <!-- Phases  -->

Modified: 
branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/client/axis2.xml
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/client/axis2.xml?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/client/axis2.xml
  (original)
+++ 
branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/client/axis2.xml
  Thu Dec 18 08:04:50 2008
@@ -255,18 +255,187 @@
     <!-- Clustering  -->
     <!-- ================================================= -->
     <!-- Configure and uncomment following for preparing Axis2 to a clustered 
environment -->
-    <!--
-    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
-        <parameter name="param1">value1</parameter>
+    <clustering 
class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="false">
+
+        <!--
+           This parameter indicates whther the cluster has to be automatically 
initalized
+           when the AxisConfiguration is built. If set to "true" the 
initialization will not be
+           done at that stage, and some other party will have to explictly 
initialize the cluster.
+        -->
+        <parameter name="AvoidInitiation">true</parameter>
+
+        <!--
+           Indicates whether this member is active or not. This will be useful 
in a setup where
+           members are deployed in ACTIVE and/or PASSIVE configuration
+        -->
+        <parameter name="isActive">true</parameter>
+
+        <!--
+           An implementation of org.apache.axis2.clustering.MembershipListener
+           which will be called on membership changes
+        -->
+        <!--
+        <parameter name="membershipListener">
+            <class>org.apache.axis2.clustering.MembershipListenerImpl</class>
+            <properties>
+                <property name="foo">bar</property>
+            </properties>
+        </parameter>
+        -->
+
+        <!--
+           The membership scheme used in this setup. The only values supported 
at the moment are
+           "multicast" and "wka"
+
+           1. multicast - membership is automatically discovered using 
multicasting
+           2. wka - Well-Known Address based multicasting. Membership is 
discovered with the help
+                    of one or more nodes running at a Well-Known Address. New 
members joining a
+                    cluster will first connect to a well-known node, register 
with the well-known node
+                    and get the membership list from it. When new members 
join, one of the well-known
+                    nodes will notify the others in the group. When a member 
leaves the cluster or
+                    is deemed to have left the cluster, it will be detected by 
the Group Membership
+                    Service (GMS) using a TCP ping mechanism.
+        -->
+        <parameter name="membershipScheme">multicast</parameter>
+
+        <!--
+         The clustering domain/group. Nodes in the same group will belong to 
the same multicast
+         domain. There will not be interference between nodes in different 
groups.
+        -->
         <parameter name="domain">apache.axis2.domain</parameter>
-       <configurationManager 
class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
-           <listener 
class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
-       </configurationManager>
-       <contextManager 
class="org.apache.axis2.cluster.context.TribesContextManager">
-           <listener 
class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
-       </contextManager>
-    </cluster>
-     -->
+
+        <!--
+           When a Web service request is received, and processed, before the 
response is sent to the
+           client, should we update the states of all members in the cluster? 
If the value of
+           this parameter is set to "true", the response to the client will be 
sent only after
+           all the members have been updated. Obviously, this can be time 
consuming. In some cases,
+           such this overhead may not be acceptable, in which case the value 
of this parameter
+           should be set to "false"
+        -->
+        <parameter name="synchronizeAll">true</parameter>
+
+        <!--
+          The maximum number of times we need to retry to send a message to a 
particular node
+          before giving up and considering that node to be faulty
+        -->
+        <parameter name="maxRetries">10</parameter>
+
+        <!-- The multicast address to be used -->
+        <parameter name="mcastAddress">228.0.0.4</parameter>
+
+        <!-- The multicast port to be used -->
+        <parameter name="mcastPort">45564</parameter>
+
+        <!-- The frequency of sending membership multicast messages (in ms) -->
+        <parameter name="mcastFrequency">500</parameter>
+
+        <!-- The time interval within which if a member does not respond, the 
member will be
+         deemed to have left the group (in ms)
+         -->
+        <parameter name="memberDropTime">3000</parameter>
+
+        <!--
+           The IP address of the network interface to which the multicasting 
has to be bound to.
+           Multicasting would be done using this interface.
+        -->
+        <parameter name="mcastBindAddress">127.0.0.1</parameter>
+
+        <!-- The host name or IP address of this member -->
+        <parameter name="localMemberHost">127.0.0.1</parameter>
+
+        <!--
+        The TCP port used by this member. This is the port through which other 
nodes will
+        contact this member
+         -->
+        <parameter name="localMemberPort">4000</parameter>
+
+        <!--
+        Preserve message ordering. This will be done according to sender order.
+        -->
+        <parameter name="preserveMessageOrder">true</parameter>
+
+        <!--
+        Maintain atmost-once message processing semantics
+        -->
+        <parameter name="atmostOnceMessageSemantics">true</parameter>
+
+        <!--
+        Properties specific to this member
+        -->
+        <parameter name="properties">
+            <property name="backendServerURL" 
value="https://${hostName}:${httpsPort}/services/"/>
+            <property name="mgtConsoleURL" 
value="https://${hostName}:${httpsPort}/"/>
+        </parameter>
+
+        <!--
+           The list of static or well-known members. These entries will only 
be valid if the
+           "membershipScheme" above is set to "wka"
+        -->
+        <members>
+            <member>
+                <hostName>127.0.0.1</hostName>
+                <port>4000</port>
+            </member>
+            <member>
+                <hostName>127.0.0.1</hostName>
+                <port>4001</port>
+            </member>
+        </members>
+
+        <!--
+        Enable the load balancer entry if you need to run this node as a load 
balancer.
+        Multiple application domains with different LoadBalanceEventHandler 
implementations
+        can be defined in this section.
+        -->
+        <groupManagement enable="false">
+            <applicationDomain name="apache.axis2.application.domain"
+                               
agent="org.apache.axis2.clustering.DefaultGroupManagementAgent"/>
+        </groupManagement>
+
+        <!--
+           This interface is responsible for handling configuration management.
+           Configuraion changes include:
+
+            1. Rebooting an entire cluster, in which case, all nodes have to 
load the new
+               Axis2 configuration in a consistent manner
+            2. Deploying a new service to a cluster or undeploying a service 
from a cluster
+            3. Changing the policies of a service deployed on the cluster
+
+            The "enable" attribute indicates whether Configuration management 
has been enabled
+        -->
+        <nodeManager 
class="org.apache.axis2.clustering.management.DefaultNodeManager"
+                     enable="true"/>
+
+        <!--
+           This interface is responsible for handling context replication. The 
property changes in
+           the Axis2 context hierarchy in this node, are propagated to all 
other nodes in the cluster.
+
+           The "excludes" patterns can be used to specify the prefixes (e.g. 
local_*) or
+           suffixes (e.g. *_local) of the properties to be excluded from 
replication. The pattern
+           "*" indicates that all properties in a particular context should 
not be replicated.
+
+            The "enable" attribute indicates whether context replication has 
been enabled
+        -->
+        <stateManager 
class="org.apache.axis2.clustering.state.DefaultStateManager"
+                      enable="true">
+            <replication>
+                <defaults>
+                    <exclude name="local_*"/>
+                    <exclude name="LOCAL_*"/>
+                </defaults>
+                <context class="org.apache.axis2.context.ConfigurationContext">
+                    <exclude name="UseAsyncOperations"/>
+                    <exclude name="SequencePropertyBeanMap"/>
+                </context>
+                <context class="org.apache.axis2.context.ServiceGroupContext">
+                    <exclude name="my.sandesha.*"/>
+                </context>
+                <context class="org.apache.axis2.context.ServiceContext">
+                    <exclude name="my.sandesha.*"/>
+                </context>
+            </replication>
+        </stateManager>
+    </clustering>
 
     <!-- ================================================= -->
     <!-- Phases  -->

Modified: 
branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/server/axis2.xml
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/server/axis2.xml?rev=27310&r1=27309&r2=27310&view=diff
==============================================================================
--- 
branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/server/axis2.xml
  (original)
+++ 
branches/synapse/1.2.wso2v1/repository/conf/sample/resources/misc/server/axis2.xml
  Thu Dec 18 08:04:50 2008
@@ -256,18 +256,187 @@
     <!-- Clustering  -->
     <!-- ================================================= -->
     <!-- Configure and uncomment following for preparing Axis2 to a clustered 
environment -->
-    <!-- 
-    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
-        <parameter name="param1">value1</parameter>
+    <clustering 
class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="false">
+
+        <!--
+           This parameter indicates whther the cluster has to be automatically 
initalized
+           when the AxisConfiguration is built. If set to "true" the 
initialization will not be
+           done at that stage, and some other party will have to explictly 
initialize the cluster.
+        -->
+        <parameter name="AvoidInitiation">true</parameter>
+
+        <!--
+           Indicates whether this member is active or not. This will be useful 
in a setup where
+           members are deployed in ACTIVE and/or PASSIVE configuration
+        -->
+        <parameter name="isActive">true</parameter>
+
+        <!--
+           An implementation of org.apache.axis2.clustering.MembershipListener
+           which will be called on membership changes
+        -->
+        <!--
+        <parameter name="membershipListener">
+            <class>org.apache.axis2.clustering.MembershipListenerImpl</class>
+            <properties>
+                <property name="foo">bar</property>
+            </properties>
+        </parameter>
+        -->
+
+        <!--
+           The membership scheme used in this setup. The only values supported 
at the moment are
+           "multicast" and "wka"
+
+           1. multicast - membership is automatically discovered using 
multicasting
+           2. wka - Well-Known Address based multicasting. Membership is 
discovered with the help
+                    of one or more nodes running at a Well-Known Address. New 
members joining a
+                    cluster will first connect to a well-known node, register 
with the well-known node
+                    and get the membership list from it. When new members 
join, one of the well-known
+                    nodes will notify the others in the group. When a member 
leaves the cluster or
+                    is deemed to have left the cluster, it will be detected by 
the Group Membership
+                    Service (GMS) using a TCP ping mechanism.
+        -->
+        <parameter name="membershipScheme">multicast</parameter>
+
+        <!--
+         The clustering domain/group. Nodes in the same group will belong to 
the same multicast
+         domain. There will not be interference between nodes in different 
groups.
+        -->
         <parameter name="domain">apache.axis2.domain</parameter>
-       <configurationManager 
class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
-           <listener 
class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
-       </configurationManager>
-       <contextManager 
class="org.apache.axis2.cluster.context.TribesContextManager">
-           <listener 
class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
-       </contextManager>
-    </cluster>
-     -->
+
+        <!--
+           When a Web service request is received, and processed, before the 
response is sent to the
+           client, should we update the states of all members in the cluster? 
If the value of
+           this parameter is set to "true", the response to the client will be 
sent only after
+           all the members have been updated. Obviously, this can be time 
consuming. In some cases,
+           such this overhead may not be acceptable, in which case the value 
of this parameter
+           should be set to "false"
+        -->
+        <parameter name="synchronizeAll">true</parameter>
+
+        <!--
+          The maximum number of times we need to retry to send a message to a 
particular node
+          before giving up and considering that node to be faulty
+        -->
+        <parameter name="maxRetries">10</parameter>
+
+        <!-- The multicast address to be used -->
+        <parameter name="mcastAddress">228.0.0.4</parameter>
+
+        <!-- The multicast port to be used -->
+        <parameter name="mcastPort">45564</parameter>
+
+        <!-- The frequency of sending membership multicast messages (in ms) -->
+        <parameter name="mcastFrequency">500</parameter>
+
+        <!-- The time interval within which if a member does not respond, the 
member will be
+         deemed to have left the group (in ms)
+         -->
+        <parameter name="memberDropTime">3000</parameter>
+
+        <!--
+           The IP address of the network interface to which the multicasting 
has to be bound to.
+           Multicasting would be done using this interface.
+        -->
+        <parameter name="mcastBindAddress">127.0.0.1</parameter>
+
+        <!-- The host name or IP address of this member -->
+        <parameter name="localMemberHost">127.0.0.1</parameter>
+
+        <!--
+        The TCP port used by this member. This is the port through which other 
nodes will
+        contact this member
+         -->
+        <parameter name="localMemberPort">4000</parameter>
+
+        <!--
+        Preserve message ordering. This will be done according to sender order.
+        -->
+        <parameter name="preserveMessageOrder">true</parameter>
+
+        <!--
+        Maintain atmost-once message processing semantics
+        -->
+        <parameter name="atmostOnceMessageSemantics">true</parameter>
+
+        <!--
+        Properties specific to this member
+        -->
+        <parameter name="properties">
+            <property name="backendServerURL" 
value="https://${hostName}:${httpsPort}/services/"/>
+            <property name="mgtConsoleURL" 
value="https://${hostName}:${httpsPort}/"/>
+        </parameter>
+
+        <!--
+           The list of static or well-known members. These entries will only 
be valid if the
+           "membershipScheme" above is set to "wka"
+        -->
+        <members>
+            <member>
+                <hostName>127.0.0.1</hostName>
+                <port>4000</port>
+            </member>
+            <member>
+                <hostName>127.0.0.1</hostName>
+                <port>4001</port>
+            </member>
+        </members>
+
+        <!--
+        Enable the load balancer entry if you need to run this node as a load 
balancer.
+        Multiple application domains with different LoadBalanceEventHandler 
implementations
+        can be defined in this section.
+        -->
+        <groupManagement enable="false">
+            <applicationDomain name="apache.axis2.application.domain"
+                               
agent="org.apache.axis2.clustering.DefaultGroupManagementAgent"/>
+        </groupManagement>
+
+        <!--
+           This interface is responsible for handling configuration management.
+           Configuraion changes include:
+
+            1. Rebooting an entire cluster, in which case, all nodes have to 
load the new
+               Axis2 configuration in a consistent manner
+            2. Deploying a new service to a cluster or undeploying a service 
from a cluster
+            3. Changing the policies of a service deployed on the cluster
+
+            The "enable" attribute indicates whether Configuration management 
has been enabled
+        -->
+        <nodeManager 
class="org.apache.axis2.clustering.management.DefaultNodeManager"
+                     enable="true"/>
+
+        <!--
+           This interface is responsible for handling context replication. The 
property changes in
+           the Axis2 context hierarchy in this node, are propagated to all 
other nodes in the cluster.
+
+           The "excludes" patterns can be used to specify the prefixes (e.g. 
local_*) or
+           suffixes (e.g. *_local) of the properties to be excluded from 
replication. The pattern
+           "*" indicates that all properties in a particular context should 
not be replicated.
+
+            The "enable" attribute indicates whether context replication has 
been enabled
+        -->
+        <stateManager 
class="org.apache.axis2.clustering.state.DefaultStateManager"
+                      enable="true">
+            <replication>
+                <defaults>
+                    <exclude name="local_*"/>
+                    <exclude name="LOCAL_*"/>
+                </defaults>
+                <context class="org.apache.axis2.context.ConfigurationContext">
+                    <exclude name="UseAsyncOperations"/>
+                    <exclude name="SequencePropertyBeanMap"/>
+                </context>
+                <context class="org.apache.axis2.context.ServiceGroupContext">
+                    <exclude name="my.sandesha.*"/>
+                </context>
+                <context class="org.apache.axis2.context.ServiceContext">
+                    <exclude name="my.sandesha.*"/>
+                </context>
+            </replication>
+        </stateManager>
+    </clustering>
      
     <!-- ================================================= -->
     <!-- Phases  -->

_______________________________________________
Esb-java-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev

Reply via email to