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 <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > > -- Afkham Azeez Senior Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ email: [email protected] 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: [email protected] For additional commands, e-mail: [email protected]
