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 David Illsley <da...@gmail.com> on 2006/09/14 14:25:19 UTC

[Axis2] Thread model for handlers

Hi all,
I've just been reviewing the AddressingOutHandler and noticed that it
sets an instance variable in the invoke method which it then uses
later in another method. I've reviewed the architecture docs and the
Handler Javadoc but neither tell me if this is ok or not.

An investigation of the Phase code suggests to me that it is not -
that for a given service there is a single instance of a Handler and
so instance variables should not be used as the same instance may be
invoked simultaneously from multiple threads. Is this correct and/or
is there any documentation about this that I've missed?

Thanks,
David

-- 
David Illsley - IBM Web Services Development

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


Re: [Axis2] Thread model for handlers

Posted by Eran Chinthaka <ch...@opensource.lk>.
David Illsley wrote:
> Hi all,
> I've just been reviewing the AddressingOutHandler and noticed that it
> sets an instance variable in the invoke method which it then uses
> later in another method. I've reviewed the architecture docs and the
> Handler Javadoc but neither tell me if this is ok or not.
> 
> An investigation of the Phase code suggests to me that it is not -
> that for a given service there is a single instance of a Handler and
> so instance variables should not be used as the same instance may be
> invoked simultaneously from multiple threads. Is this correct and/or
> is there any documentation about this that I've missed?
If there is something like that, I do accept all the complaints and
please feel free to correct it.

-- Chinthaka


Re: [Axis2] Thread model for handlers

Posted by Davanum Srinivas <da...@gmail.com>.
Yes, you are right., the code is wrong.

thanks,
dims

On 9/14/06, David Illsley <da...@gmail.com> wrote:
> Hi all,
> I've just been reviewing the AddressingOutHandler and noticed that it
> sets an instance variable in the invoke method which it then uses
> later in another method. I've reviewed the architecture docs and the
> Handler Javadoc but neither tell me if this is ok or not.
>
> An investigation of the Phase code suggests to me that it is not -
> that for a given service there is a single instance of a Handler and
> so instance variables should not be used as the same instance may be
> invoked simultaneously from multiple threads. Is this correct and/or
> is there any documentation about this that I've missed?
>
> Thanks,
> David
>
> --
> David Illsley - IBM Web Services Development
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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