Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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.