You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Afkham Azeez <af...@gmail.com> on 2010/07/17 17:33:07 UTC

Re: How Axis2 function in a clustered environment

MessageContext state is never replicated. That does not make sense &
is expensive to do since a MessageContext's lifetime is within a
single flow. Replication works only for Service/ServiceGroup/Config
Contexts.

Automatic replication happens in the default MessageReceivers in Axis2
at the end of processing the messages before sending the response to
the client, if full synchronization is set to true. Otherwise, the
response is sent to the client, while the state is replicated
asynchronously.

Azeez

On Sat, Jul 17, 2010 at 3:17 PM, Amila Jayasekara <am...@wso2.com> wrote:
> Hi All,
>   I am trying to implement a cluster with 3 nodes using Tomcat and Axis2.
> Also i have a state which i write to MessageContext. Thus i wanted, Axis2 to
> replicate above MessageContext among all nodes within the cluster.
>      To do this i changed Axis2 XML and also attached MessageContext as a
> replication context. But it seems the property that i am in serting into the
> MessageContext is not visible to other nodes in the cluster.
> <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="local_*"/>
>                   <exclude name="UseAsyncOperations"/>
>                   <exclude name="SequencePropertyBeanMap"/>
>               </context>
>               <context class="org.apache.axis2.context.ServiceGroupContext">
>                   <exclude name="local_*"/>
>                   <exclude name="my.sandesha.*"/>
>               </context>
>               <context class="org.apache.axis2.context.ServiceContext">
>                   <exclude name="local_*"/>
>                   <exclude name="my.sandesha.*"/>
>               </context>
>               <context class="org.apache.axis2.context.MessageContext">
>                   <exclude name="local_*"/>
>               </context>
>           </replication>
>       </stateManager>
>
> I have following questions related to this issue,
>
> 1. Can we replicate MessageContexts ? If so how ? Above mentioned
> configuration didnt work
> 2. When does Axis2 nodes are exchanging altered contexts?  Ex :- "Is it
> before sending a message to a server or after sending a message, etc ...")"
>
> Appreciate if someone can give feedback.
>
> Thank you
> AmilaJ
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>



-- 
Afkham Azeez
Senior Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.;
http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
email: azeez@wso2.com cell: +94 77 3320919
blog: http://blog.afkham.org
twitter: http://twitter.com/afkham_azeez
linked-in: http://lk.linkedin.com/in/afkhamazeez

Lean . Enterprise . Middleware

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org