[ https://issues.apache.org/jira/browse/CXF-1812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633676#action_12633676 ]
Daniel Kulp commented on CXF-1812: ---------------------------------- Freeman, This is working as designed. The purpose of the pause/resume stuff in the PIC is to pause the execution of the chain on that thread so it can then be resumed on a different thread. Mainly, an interceptor can call pause, then put the chain on an executor or something which will resume it later. The current thread would then unwind and be able to service another thread. With you change, the thread will block until another thread calls the resume stuff. > refactor the pause/resume mechanism in PhaseInterceptorChain > ------------------------------------------------------------ > > Key: CXF-1812 > URL: https://issues.apache.org/jira/browse/CXF-1812 > Project: CXF > Issue Type: Improvement > Reporter: Freeman Fang > Assignee: Freeman Fang > Fix For: 2.0.9, 2.1.3, 2.2 > > > currently the pause/resume in PhaseInterceptorChain doesn't work. > If invoke pause() in one interceptor, the PhaseInterceptorChain.doIntercept() > will exit with COMPLETE status, which means we have no chance to resume the > paused interceptorChain. > We need use wait/notifyall mechanism to refactor it > something like in PhaseInterceptorChain.doIntercept(), we add > while (state == State.PAUSED) { > try { > wait(); > } catch (InterruptedException e) { > } > } > notifyAll(); > and the resume() method should be > if (state == State.PAUSED) { > state = State.EXECUTING; > notifyAll(); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.