On May 1, 2006, at 1:59 PM, Frederic Soulier wrote:
I really dug into MINA (0.9.3) today and I managed to implement 1 message (and funnily enough it works!) using the SumUp examples as my starting point.

excellent!

Would it be better to have only 1 decoder and a case structure in decode that would instantiate the right message based on the type.

I think so :) .. This is more akin to what I've implemented in my project. I'm using the ProtocolCodecFilter when a Decoder that reads the message type and length, and once it is all there, forwards the buffer to another decoder.

Also ultimately the messages will be processed by
   public void messageReceived(IoSession session, Object message)
in my IoHandler
Is it ok to have long running transactions in there?

That's up to you and what your application is doing. If you're using JTA and can suspend/resume a transaction, that might be ideal (you could do this in an IoFilter).

Just make sure that transaction state is not stored in a ThreadLocal, because subsequent requests for the same connection are not guaranteed to occur on a particular thread. (A JTA suspend/resume will accomplish this)

Do I need to add a ThreadPoolFilter to the chain or is one automatically setup? Looking at the src BaseIoServiceConfig file it seems a PooledThreadModel (with max size = 16) is the default if the user doesn't defined one, right?

correct.

[Logging issue]
Finally I keep getting the warning from Log4j (log4j:WARN No appenders could be found for logger) and I'm baffled as to why it does that.

dunno, I use jdk14 logging :)

Some comments:
- I really like what I've seen so far and most of my problems come from not knowing exactly how to use the framework - The getting started stuff on the web site and the fact I'm using the unstable version confuses things :)

Glad to hear you're having success!
-pete

--
[EMAIL PROTECTED] - http://fotap.org/~osi


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to