Logically, one thread is associated with one session, that's the idea.
If you have more than one thread writing data in one single session,
then yes, you may have problems...



Emmanuel, I don't understand what you are saying.
What I mean is that once the server receive a message, it selects a thread to handle this message within its session. And if you have more than one thread writing in a session, it may not be thread safe.
I've never tried it because my apps don't need this, but I've always had the
impression that multiple threads writing to the same IoSession
simultaneously should work.
I think that the key is how you enforce this simultaneous writing. Now, if you consider that the server is reacting to incoming messages, then there is only one thread writing in a session, as this thread has been selected to deal with the incoming message.

If your handler spawn more than one thread, which all write something, I have no idea how the server can behave. This is something I never thought could be done, or worth to be done. May be it's simply not supported...

At this point, some small test demonstrating the problem could help, I think.
And that in the past, it is has been advertised to work.

But we do have an open bug about it:
https://issues.apache.org/jira/browse/DIRMINA-653

wdyt ?
Seems that it's an extreme scenario, not likely to be used in real life, but I may be wrong ?

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to