directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject The right place to create the decoder ...
Date Tue, 05 Oct 2010 22:49:22 GMT

we have a over-complicated system to initialize the decoder and all what 
we need for the message processing : we use factories, we pull data 
structure related to the server while we create the decoder and the 
encoder, when we receive the first message to decode.

This is just plain wrong. Mina has the exact event to use when the 
session is created : the sessionCreated() event, which goes up to the 
handler. This is the right place to do whatever we have to do to 
initialize the encoder the decoder, and put every information we need to 
correctly process an incoming message.

I don't know why I didn't realized that before, because it's absolutely 
obvious. Maybe because it was just working more or less, and I never had 
the time not the will to rethink this part.

Or may be I'm just tired and I need to get some sleep...

So here is what I gonna do : I will sleep on this idea, and let see what 
it brings, or maybe you guys have a better insight about this problem :)

nn !

Emmanuel L├ęcharny

View raw message