Deepal Jayasinghe wrote:
Hi  Azeez ,
I think AbstractMessageReceiver it self can call that replicateState
method , same as it calls invokeBusinssLogic.

So what if some one implement MR interface than extending
AbstractMessageReceiver.

If we have functionality that really wants to be "core" like clustering and asynchrony, perhaps we should either:

1) Refactor MessageReceiver into an abstract class with no interface, so people are forced to extend it, or

2) Put this kind of thing into AxisEngine itself as a part of the flow management

I think I'd prefer (2).

--Glen

Thanks
Deepal
Hi Folks,
Related to the stuff I discussed with some guys at the hackathon, it
seems like a Handler is not the appropriate place to carry out state
replication. One of the main reasons is that we cannot throw faults
when flowComplete is invoked. It has to be at the message receiver
level. The state replication should take place soon after the service
implementation gets called. So I've added a simple method to
AbstractMessageReceiver;

 public void replicateState(MessageContext messageContext) throws
ClusteringFault {
        Replicator.replicate(messageContext);
   }

Soon after invoking the business logic, this method needs to be
called. The Replicator will replicate the state only if context
replication is enabled in the axis2.xml. Anybody writing a custom MR
will need to call this method after invoking the business logic, if
they are to get replication capability.

I have already added the code to all our MRs, but still haven't
committed it.

TODO: The code generation functionality has to be fixed to call this
method. Amila, can you help out with this?

--
Thanks
Afkham Azeez

http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to