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 2007/06/13 12:51:21 UTC

[Axis2[ Clustering: Adding replicateState method to AbstractMessageReceiver

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

Re: [Axis2[ Clustering: Adding replicateState method to AbstractMessageReceiver

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If next release manager can keep a list of changed interfaces, and
publish them with the release, then it will reduce the number of
complaints that we get about API changes.

Just a thought in general for API changes.

Afkham Azeez wrote:
> 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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGcCEIjON2uBzUhh8RAiFTAKCJ2NfsmqMiUcnRKVmlxvWvlARHwwCeKdHG
oNsMQq1t9JW8gWgRXES4OIw=
=syj7
-----END PGP SIGNATURE-----

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


Re: [Axis2[ Clustering: Adding replicateState method to AbstractMessageReceiver

Posted by Afkham Azeez <af...@gmail.com>.
One more thing... are there any objections to this approach?

-- Azeez

On 6/13/07, Afkham Azeez <af...@gmail.com> wrote:
>
> 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




-- 
Thanks
Afkham Azeez

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

Re: [Axis2[ Clustering: Adding replicateState method to AbstractMessageReceiver

Posted by Glen Daniels <gl...@thoughtcraft.com>.
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [Axis2[ Clustering: Adding replicateState method to AbstractMessageReceiver

Posted by Deepal Jayasinghe <de...@opensource.lk>.
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.

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 

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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