Rajith,
> > > > Most part of synapse is stateless and hence does not have any effect > > over clustering, but Caching and Throttling does. So Caching and Throttle > > mediators use the axis2-clustering implementation to replicate the state of > > those mediators among the cluster within the implementation of those > > mediators it self. Other than that we do not replicate states of synapse in > > a global scope. I think this model fits for the moment and has performance > > improvements over supporting clustering in a global scope. > > > > Yep I am in agreement. The reason I asked about clustering is bcos of the > recent thread on session mgt and the need to have the session-mediator state > replicated across the cluster (I hope I didn't misunderstand the requirments > here). I was wondering if this sort of thing is trivial to implement. Like > can we replicate any mediator state if we choose to in a trivial way? > Yes it is, I think the session-mediator has to take the replication in to account (i.e. another state full mediator for synapse :)). If you are using the ConfigurationContext of axis2 (basically the whole context hierarchy) to store the data (for example, the session data table mapped using a session id) ** you just need to call ConfigurationContext.flush(); to replicate any data which has been changed after the last replication. Additionally if you need to just replicate some of the properties of the cfgCtx then you can call the the flush method with the property names (see the clustering API for the exact signature of the method, I don't remember that exactly). Or else to replicate the whole context hierarchy you could use Replicator.replicate(); as well. One has to decide the proper method and when to use which by evaluating the complexity and performance of the implementation .... Thanks, Ruwan -- Ruwan Linton http://www.wso2.org - "Oxygenating the Web Services Platform"
