Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2841

WS-RM returns an exception to the client even when its retry mechanim successfully delivers the message after some transmission error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.7, 2.2.8, 2.2.9
    • Fix Version/s: 2.2.10
    • Component/s: WS-* Components
    • Labels:
      None
    • Environment:

      JDK 1.6.0_16, Windows XP

    • Estimated Complexity:
      Unknown

      Description

      This problem can be easily reproduced in the CXF's ws-rm demo sample.

      When the target server is available at the createSequence step but becomes unavailable before the application message transmission, the retransmission of this message is performed by another thread until the message is delivered according to the policy, but the original client thread is getting the ConnectException while the retransmission is taking place in background. So in this case, the client gets the exception but the message can be successfully delivered to the target system when the target server becomes available.

      When the WS-RM feature is engaged and retransmission of the message is taken care by its runtime, the temporary exception should not be returned to the client.

      One way to fix this issue would be to make the RetransmissionInterceptor's fault handling method clear the exception object which is set in the message by the PhaseInterceptorChain's doInterceptor method.

      Concretely, adding the following code in org.apache.cxf.ws.rm.RetransmissionInterceptor's handle method seems to fix this issue.

      ...
      if (isFault)

      { // remove the exception set by the PhaseInterceptorChain so that the error does not reach the client // when retransmission is scheduled message.setContent(Exception.class, null); message.getExchange().put(Exception.class, null); }

      else

      { WriteOnCloseOutputStrea ... ... }

      Regards, Aki

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              ay Akitoshi Yoshida
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: