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 "Jaliya Ekanayake (JIRA)" <ji...@apache.org> on 2007/06/12 21:31:26 UTC

[jira] Resolved: (AXIS2-2655) The place CommonsHTTPTransportSender sets RESPONSE_WRITTEN to true causes a race condition

     [ https://issues.apache.org/jira/browse/AXIS2-2655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jaliya Ekanayake resolved AXIS2-2655.
-------------------------------------

    Resolution: Fixed

 We should only set the property Constants.RESPONSE_WRITTEN=true only if we are in the
 server side. If it is in the client side we may not know whether we have received the response
 in an async request/response case.

> The place CommonsHTTPTransportSender sets RESPONSE_WRITTEN to true causes a race condition
> ------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2655
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2655
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.2
>            Reporter: Chamikara Jayalath
>            Assignee: Jaliya Ekanayake
>            Priority: Blocker
>
> CommonsHTTPTransportSender invoke method ends with the following code block.
>             if ((epr != null) && (!epr.hasNoneAddress())) {
>                 writeMessageWithCommons(msgContext, epr, format);
>             } else if (msgContext.getProperty(MessageContext.TRANSPORT_OUT) != null) {
>                 sendUsingOutputStream(msgContext, format);
>             } else {
>                 throw new AxisFault(
>                         "Both the TO and MessageContext.TRANSPORT_OUT property are Null, No where to send");
>             }
>             if (msgContext.getOperationContext() != null) {
>                 msgContext.getOperationContext().setProperty(
>                         Constants.RESPONSE_WRITTEN, Constants.VALUE_TRUE);
>             }
> In the client side the last if block could cause a race condition. I.e. if an async response comes to the client after this code block is passed in the sending side, the transport acking of the response message will be done with a 200 OK (not a 202 OK). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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