Hi, in the different protocols we have in ADS, we are using a IoHandlerChain inherited class to handle the received messages. Although I think that this pattern is sometime usefull if you want to use an evolving message handling (like adding dynamically some processing), in this very case, we have just fixed handlers.
There are three main concerns whith this pattern usage : 1) it's really painfull to debug, as you have to set BP in every handler when you step through the code 2) it slow down the processing for heavily loaded servers 3) it forces the implementor to inject data through a session attribute, which is not exactly the best solution, but you do'nt have any other I would suggest to switch from this pattern to a simpler one, where we keep the handler decomposition (I like the idea of decomposing treatments in small disconnected methods, compared to a big fat method), but using as many methods as we have handlers. Doing so will remove the 2 first points, without modifying the logic of the current code, while the 3rd point will substitute a parameter passing to a session storage. The last gain is that we won't have anymore 150 lines in stackTraces ... wdyt ? -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
