On 8/30/07, Chris Winters <[EMAIL PROTECTED]> wrote: > > > >> I'm a Mina newbie, so "the thread pool" he's discussing here is a > little > >> fuzzy, It seems from reading the "Configuring thread model" page > >> (http://mina.apache.org/configuring-thread-model.html) that he's > >> referencing > >> an ExecutorFilter added to the IoFilterChain -- is that correct? > > > Yes. Everything behind the ExecutorFilter (within the same request) can > > safely use a ThreadLocal. > > Sorry I wasn't more clear.
Of course, your code should not assume that two messageReceived events for the same IoSession will be handled by the same thread. So storing something in a threadlocal in the first messageReceived event and trying to retrieve it in the second event is NOT safe. (at least not in combination with an executorfilter) But that's rather obvious, I guess. Great, thanks for the clarification. > > BTW, integrating Mina into my existing networked application has been a > snap. Hope to blog about this soon. > > Best wishes, > > Chris > -- > View this message in context: > http://www.nabble.com/ThreadLocal-with-Mina%3A-ok-or-not--tf4354098s16868.html#a12408585 > Sent from the Apache MINA Support Forum mailing list archive at Nabble.com > . > >
