You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2010/09/06 13:31:33 UTC
[jira] Updated: (CXF-2975) ChainInitiationObserver lack
synchronization which could causes continuations to malfunction for some
rare scenario
[ https://issues.apache.org/jira/browse/CXF-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Fang updated CXF-2975:
------------------------------
Description:
If we call continuation.resume in another thread after we call continuation.suspend immediately, we may encounter a situation where resume is called on continuation before the SuspendedInvocationException causes PhaseInterceptorChain to change state to 'paused', so that ChainInitiationObserver instead of resuming the the PhaseInterceptorChain from where it was suspended, it starts it's from the beginning. This is incorrect as interceptors that has already been run are called again in this case.
With this attached testcase which expose this problem, simply use continuation api in a jaxws provider, we can see the IncomingMessageCounterInterceptor get invoked twice for one incoming messsage intermittently.
was:
If we call continuation.resume in another thread after we call continuation.suspend immediately, we may encounter a situation where resume is called on continuation before the SuspendedInvocationException causes PhaseInterceptorChain to change state to 'paused', so that ChainInitiationObserver instead of resuming the the PhaseInterceptorChain from where it was suspended, it starts it's from the beginning. This is incorrect as interceptors that has already been run are called again in this case.
With this attached testcase which expose this problem, simply use continuation api in a jaxws provider, we can see the IncomingMessageCounterInterceptor get invoked twice for one incoming messsage.
> ChainInitiationObserver lack synchronization which could causes continuations to malfunction for some rare scenario
> --------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-2975
> URL: https://issues.apache.org/jira/browse/CXF-2975
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.2.10
> Reporter: Freeman Fang
> Assignee: Freeman Fang
> Fix For: 2.3, 2.2.11
>
> Attachments: testcase.patch
>
>
> If we call continuation.resume in another thread after we call continuation.suspend immediately, we may encounter a situation where resume is called on continuation before the SuspendedInvocationException causes PhaseInterceptorChain to change state to 'paused', so that ChainInitiationObserver instead of resuming the the PhaseInterceptorChain from where it was suspended, it starts it's from the beginning. This is incorrect as interceptors that has already been run are called again in this case.
> With this attached testcase which expose this problem, simply use continuation api in a jaxws provider, we can see the IncomingMessageCounterInterceptor get invoked twice for one incoming messsage intermittently.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.