----- Original Message ---- From: Chris Winters <[EMAIL PROTECTED]> To: [email protected] Sent: Thursday, August 30, 2007 8:51:36 AM Subject: ThreadLocal with Mina: ok or not?
> In April of this year someone posted a question about using Mina with > frameworks that use ThreadLocal (Hibernate, Spring, etc.): > > http://mail-archives.apache.org/mod_mbox/mina-dev/200704.mbox/[EMAIL > PROTECTED] > > There, Rob Butler mentioned: > > > ...Since DB interaction, etc could possibly block these > > operations should be done within a worker thread obtained from the thread > > pool. > > 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. Rob ____________________________________________________________________________________ Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
