How to Enable Either Configuration Management or Context Replication in a WSAS Cluster?

Archived Content
This article is provided for historical perspective only, and may not reflect current conditions. Please refer to relevant product page for more up-to-date product information and resources.
  • By Afkham Azeez
  • 26 Oct, 2007

Context replication refers to state replication of stateful Web services. When context replication is enabled, serializable objects placed in the Axis2 ConfigurationContext, ServiceGroupContext or ServiceContext will be replicated across the cluster.

In some production systems, you may need only to enable either Configuration Management or Context Replication. In other words, enable Configuration management while Context replication is disabled or vice versa.

First locate the following section in the axis2.xml that is included with WSAS. This can be found at WSO2WSAS_HOME/conf/axis2.xml

<!-- ================================================= --> 
<!-- Clustering -->
<!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
<!-- ================================================= -->
<!--
<cluster class="org.apache.axis2.clustering.tribes.TribesClusterManager">
<parameter name="AvoidInitiation">true</parameter>
<parameter name="domain">wso2wsas.domain</parameter>

<configurationManager
class="org.wso2.wsas.clustering.configuration.WSASConfigurationManager">
<parameter name="CommitTimeout">20000</parameter>
<parameter name="NotificationWaitTime">2000</parameter>
<listener class="org.wso2.wsas.clustering.configuration.WSASConfigurationManagerListener"/>
</configurationManager>

<contextManager class="org.apache.axis2.clustering.context.DefaultContextManager">
<listener class="org.apache.axis2.clustering.context.DefaultContextManagerListener"/>
<replication>
<defaults>
<exclude name="local_*"/>
<exclude name="LOCAL_*"/>
<exclude name="wso2tracer.msg.seq.buff"/>
<exclude name="wso2tracer.trace.persister.impl"/>
<exclude name="wso2tracer.trace.filter.impl"/>
</defaults>
<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="WSO2 WSAS"/>
<exclude name="wso2wsas.generated.pages"/>
<exclude name="ConfigContextTimeoutInterval"/>
<exclude name="ContainerManaged"/>
</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>
</contextManager>
</cluster>
-->

The above segment is commented out by default, so clustering will not be enabled by default. If you wish to enable clustering, first, you have to uncomment the above segment.

When you uncomment the clustering section, as described above, you will notice that there are two main subsections; configurationManager & contextManager.

If you wish to enable only Configuration management, completely comment out the contextManager section.

If you wish to enable only Context replication, completely comment out the configurationManager section.

Applies To

WSO2 WSAS 2.0 & newer versions

 

More Information

Rest of the WSO2 WSAS HOWTO series