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

Attachments gone when in Multi-Threaded client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.7, 2.2.4
    • Transports
    • None

    Description

      Multi-Threaded client using a web-services that returns one or multiple attachments (MTOM). Client stubs are not shared between threads. HTTP-Binding and WS-Addressing is used.
      From time to time attachments are missing is the response. After playing around with this for some time I found that data that is read from the PushbackInputStream often gets unread shortly afterwards. When the problem occurred this did not happen, causing the AttachmentDeserializer to "think" that there are fewer attachments. After more digging, I found this member in HTTPConduit:

      private static final byte BUFFER[] = new byte[1024];

      This is only used in the HTTPConduit.close(). However, it is shared between all instances of HTTPConduit and it seems to be possible that close() gets called by multiple threads. Ensuring that the buffer is created within close() seems to solve the problem, however, there are most likely better solutions to this.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            jriemsch Jеns Riеmschneidеɾ
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: