Hi All,

I want to write a multi threaded client protocol using Mina but I am having some problem.

I did the fallowing:
- I wrote a ProtocolDecoded/ProtocolEncoder ant tested it carefully
- The protocol is TCP
- The usage scenario is:
  1. I configure a Connector to use the Encoder/Decoder
  2. I connect it and get The IoSession
  3. I share the IoSession between some threads. Each thread calls session.write, that means taht the IoSession is accessed concurrently.
  4. I also wrote an IoHandler class in order to process the answer from the server
The problem is that it is working ok with just one thread but it is failing to send some message in a multi threaded scenario.
I checked my code and it seems ok.
Am I doing something wrong with Mina? Is it ok to concurrently access the IoSession  from different threads?

Thank you all

Stefano

Reply via email to