MDc uses ThreadLocal so you syou always reset your MDC values between requests (either clear at the end of the request or overwrite at the beginning of the request).
On 8/28/06, Meera Mehta <[EMAIL PROTECTED]> wrote:
James, Thanks for the answer >"You > should always assume that you need to reset the > ThreadLocal right > after you retrieve a Thread from a pool." But i am just using Log4J's MDC. So My Query is : Is LOG4J resetting ThreadLocal ??? OR assuming Application(which is using Log4j) to do that OR Assuming Application Server(in my case WebSphere) to do this task of resetting??? Please make me clear, and please explain in detail because i am not master in either Log4J or ThreaLocal or Threads.. Thanks for your Quick Reply, Regards, --- James Stauffer <[EMAIL PROTECTED]> wrote: > To comment on that link, ThreadLocals are safe if > used correctly. You > should always assume that you need to reset the > ThreadLocal right > after you retrieve a Thread from a pool. > > On 8/25/06, Meera Mehta <[EMAIL PROTECTED]> > wrote: > > Hi ysuneel, > > > > Thanks for your short and sweet reply........ > > > > but i was expecting little detailed answer if > > possible! > > > > I have gone threw following link , > > > > > http://www.devwebsphere.com/devwebsphere/2005/06/dont_use_thread.html > > > > > > where they trying to encourage against > > it's(ThreadLocal) use. > > > > I dont know internals of MDC but i just know MDC > is > > using ThreadLocal, thats why i wanted to know > "Wether > > we are relying on Application server(in my case > > WebSphere) for cleanup" > > > > > > > > thanks in advance, > > > > > > --- ysuneelreddy <[EMAIL PROTECTED]> wrote: > > > > > Bcz of using MDC > > > Nothing happened side effects.. > > > > > > > > > -----Original Message----- > > > From: Meera Mehta [mailto:[EMAIL PROTECTED] > > > Sent: Friday, August 25, 2006 3:47 PM > > > To: [email protected] > > > Subject: MDC Query > > > > > > Hi All , > > > > > > I have small doubt related to MDC are we relying > on > > > MDC(ThreadLocal) being cleaned up by the > application > > > server when the thread is returned to the > pool?????? > > > > > > if yes What are the side effects of this > reliance??? > > > > > > please reply in detail. > > > > > > Thanks in advance. > > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > > protection around > > > http://mail.yahoo.com > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > James Stauffer > http://www.geocities.com/stauffer_james/ > Are you good? Take the test at > http://www.livingwaters.com/good/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- James Stauffer http://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
