Hi,

I ran into a multi-threading problem with a web service that returned
multiple attachments. After playing around with this for some time I found
that data that is read from the PushbackInputStream often gets unread
shortly afterwards. When my problem occurred this did not happen, causing
the AttachmentDeserializer to "think" that there are fewer attachments.
After more diffing, 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. I removed the 'static' from the field definition
and didn't see any problems anymore. I'm still not so sure about all the
details that occur and why this buffer causes problems with attachments.
Could someone confirm that this is a bug or could it be that my setup is
wrong?

Thanks,
Jens
-- 
View this message in context: 
http://www.nabble.com/Static-buffer-field-in-HTTPConduit-tp24808979p24808979.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to