Le 30/05/2014 18:14, Skywalker a écrit : >>>> What are the part of the code you are working on ? What is the part of >>>> the server code taht selects the session to which teh response wil be >>>> sent ? > I do not have access to the server code. It is a Commercial Off the Shelf > Software. I am working with the ProtocolDecoder and ProtocolEncoder.
The pb is that if something just shuffles the session after the decoding of your message, I don't see how possibly you can restore it. Now, if, and only if, there is no executor in the chain, and if there is a guarantee that the thread processing the request is the same than the thread processing the answer (and here, I mean no other session session will use this thread in the mean time), then you can store the original session into the ThreadLocalStorage, and get it back while processing the encoding. That could work...
