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 "Chamikara Jayalath (JIRA)" <ji...@apache.org> on 2007/05/11 15:24:15 UTC

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

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


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


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

Posted by "Jaliya Ekanayake (JIRA)" <ji...@apache.org>.
     [ 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


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-2655:
------------------------------------

    Priority: Blocker  (was: Major)

> 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: Deepal Jayasinghe
>            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


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-2655:
------------------------------------

    Assignee: Deepal Jayasinghe

> 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: Deepal Jayasinghe
>
> 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


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502830 ] 

Davanum Srinivas commented on AXIS2-2655:
-----------------------------------------

If we need to fix this, please do it ASAP. as it means more testing for other scenarios.

thanks,
dims

> 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: Deepal Jayasinghe
>            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


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

Posted by "Jaliya Ekanayake (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jaliya Ekanayake reassigned AXIS2-2655:
---------------------------------------

    Assignee: Jaliya Ekanayake  (was: Deepal Jayasinghe)

> 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