You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Guillaume Sauthier (JIRA)" <ji...@apache.org> on 2010/03/12 17:03:27 UTC

[jira] Created: (CXF-2711) Concurrency issue with AsyncHandler

Concurrency issue with AsyncHandler
-----------------------------------

                 Key: CXF-2711
                 URL: https://issues.apache.org/jira/browse/CXF-2711
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.2.6
         Environment: OW2 JOnAS 5.2
            Reporter: Guillaume Sauthier


The problem is on the access to the ClientCallback.done boolean

You can have a situation where the client uses the Future object he got from the dispatch.invokeAsync() method.
It performs an active wait using Future.isDone()

On another Thread, the WS response comes back, and the JaxwsClientCallback.handlerResponse() is called. The handler provided by the client is called, so far everything went well. After the AsyncHandler.handleResponse() invocation, the ClientCallback set the 'done' boolean to true.

But this value change is never seen by the Future.isDone() invocations!

Because the ClientCallback.done boolean is not 'volatile'.

I've made a try with a volatile 'done' and it works perfectly.

Could it be possible that this simple change makes it to the 2.2.7 ?

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


[jira] Updated: (CXF-2711) Concurrency issue with AsyncHandler

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

Guillaume Sauthier updated CXF-2711:
------------------------------------

    Attachment: CXF-2711.patch

Set ClientCallback.done field as volatile.

> Concurrency issue with AsyncHandler
> -----------------------------------
>
>                 Key: CXF-2711
>                 URL: https://issues.apache.org/jira/browse/CXF-2711
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.6
>         Environment: OW2 JOnAS 5.2
>            Reporter: Guillaume Sauthier
>         Attachments: CXF-2711.patch
>
>
> The problem is on the access to the ClientCallback.done boolean
> You can have a situation where the client uses the Future object he got from the dispatch.invokeAsync() method.
> It performs an active wait using Future.isDone()
> On another Thread, the WS response comes back, and the JaxwsClientCallback.handlerResponse() is called. The handler provided by the client is called, so far everything went well. After the AsyncHandler.handleResponse() invocation, the ClientCallback set the 'done' boolean to true.
> But this value change is never seen by the Future.isDone() invocations!
> Because the ClientCallback.done boolean is not 'volatile'.
> I've made a try with a volatile 'done' and it works perfectly.
> Could it be possible that this simple change makes it to the 2.2.7 ?

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


[jira] Assigned: (CXF-2711) Concurrency issue with AsyncHandler

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

Daniel Kulp reassigned CXF-2711:
--------------------------------

    Assignee: Daniel Kulp

> Concurrency issue with AsyncHandler
> -----------------------------------
>
>                 Key: CXF-2711
>                 URL: https://issues.apache.org/jira/browse/CXF-2711
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.6
>         Environment: OW2 JOnAS 5.2
>            Reporter: Guillaume Sauthier
>            Assignee: Daniel Kulp
>         Attachments: CXF-2711.patch
>
>
> The problem is on the access to the ClientCallback.done boolean
> You can have a situation where the client uses the Future object he got from the dispatch.invokeAsync() method.
> It performs an active wait using Future.isDone()
> On another Thread, the WS response comes back, and the JaxwsClientCallback.handlerResponse() is called. The handler provided by the client is called, so far everything went well. After the AsyncHandler.handleResponse() invocation, the ClientCallback set the 'done' boolean to true.
> But this value change is never seen by the Future.isDone() invocations!
> Because the ClientCallback.done boolean is not 'volatile'.
> I've made a try with a volatile 'done' and it works perfectly.
> Could it be possible that this simple change makes it to the 2.2.7 ?

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


[jira] Closed: (CXF-2711) Concurrency issue with AsyncHandler

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

Guillaume Sauthier closed CXF-2711.
-----------------------------------


Thanks

> Concurrency issue with AsyncHandler
> -----------------------------------
>
>                 Key: CXF-2711
>                 URL: https://issues.apache.org/jira/browse/CXF-2711
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.6
>         Environment: OW2 JOnAS 5.2
>            Reporter: Guillaume Sauthier
>            Assignee: Daniel Kulp
>             Fix For: 2.2.7
>
>         Attachments: CXF-2711.patch
>
>
> The problem is on the access to the ClientCallback.done boolean
> You can have a situation where the client uses the Future object he got from the dispatch.invokeAsync() method.
> It performs an active wait using Future.isDone()
> On another Thread, the WS response comes back, and the JaxwsClientCallback.handlerResponse() is called. The handler provided by the client is called, so far everything went well. After the AsyncHandler.handleResponse() invocation, the ClientCallback set the 'done' boolean to true.
> But this value change is never seen by the Future.isDone() invocations!
> Because the ClientCallback.done boolean is not 'volatile'.
> I've made a try with a volatile 'done' and it works perfectly.
> Could it be possible that this simple change makes it to the 2.2.7 ?

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


[jira] Resolved: (CXF-2711) Concurrency issue with AsyncHandler

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

Daniel Kulp resolved CXF-2711.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.7

> Concurrency issue with AsyncHandler
> -----------------------------------
>
>                 Key: CXF-2711
>                 URL: https://issues.apache.org/jira/browse/CXF-2711
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.6
>         Environment: OW2 JOnAS 5.2
>            Reporter: Guillaume Sauthier
>            Assignee: Daniel Kulp
>             Fix For: 2.2.7
>
>         Attachments: CXF-2711.patch
>
>
> The problem is on the access to the ClientCallback.done boolean
> You can have a situation where the client uses the Future object he got from the dispatch.invokeAsync() method.
> It performs an active wait using Future.isDone()
> On another Thread, the WS response comes back, and the JaxwsClientCallback.handlerResponse() is called. The handler provided by the client is called, so far everything went well. After the AsyncHandler.handleResponse() invocation, the ClientCallback set the 'done' boolean to true.
> But this value change is never seen by the Future.isDone() invocations!
> Because the ClientCallback.done boolean is not 'volatile'.
> I've made a try with a volatile 'done' and it works perfectly.
> Could it be possible that this simple change makes it to the 2.2.7 ?

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