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

client using decoupled ws-addressing with async handler hang from time to time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2, 2.0.11, 2.1.5
    • None
    • None

    Description

      If we use decoupled ws-addressing and async invaction handler, client side will hang from time to time. At the same time we can see some error like "Connection reset by peer".
      The fix is in HTTPConduit, we should cache the InputStream of inMessage before invoke the clientImpl.onMessage, since for async mode, the onMessage is in anonther thead and executing by executor, we can't guarantee the connection still alive when onMessage really invoked.
      So we need do like

                      InputStream in = inMessage.getContent(InputStream.class);
                      CachedOutputStream cos = new CachedOutputStream();
                      IOUtils.copy(in, cos);
                      inMessage.setContent(InputStream.class, cos.getInputStream());
                      incomingObserver.onMessage(inMessage);
      

      to cache the inputstream to ensure it's still there when we use it.

      Attachments

        Activity

          People

            ffang Freeman Yue Fang
            ffang Freeman Yue Fang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: