Hi Peter Pan,
I also had to take a look under the hood to see what NDC was doing - it wasn't clear 
to me from the docs:
1. public static String get(); will return a string representation of your stack which 
you can simply log to record your stack contents from time to time in your code.
2. NDC gets the name of your thread in it's static method and creates a unique stack 
based on your thread name. i.e. there are potentially a whole bunch of thread stacks 
(as many as there are threads calling the NDC static methods), each building its own 
stack of messages based on its thread name.
Hope this helps,
Matthew
-----Original Message-----
From: [EMAIL PROTECTED]
Date: Mon, 18 Jun 2001 10:27:52 -0400
To: [EMAIL PROTECTED]
Subject: Confusing in NDC


Re: When log in multithread and other concurrent enviroment, NDC is used to push
Re: something so that the logs can be distinguished. I am quite confused in the
Re: follwoing points,
Re: 
Re: 1. I see the sample program such as NumberCruncher only push something such as
Re: localhost into the stack, but I do not see how those in stack finally are
Re: written into the log files. Are they automatically written into the log files?
Re: What is the relationn between category.info/debug/... and NDS.push()/pop()?
Re: 
Re: 2. NDS have static interface functions. The stack it operated on should be
Re: statich also. For multi-thread, the static member in class has seperate copy per
Re: thread or they share still one copy?
Re: 
Re: Thanks,
Re: Peter
Re: 
Re: ---------------------------------------------------------------------
Re: To unsubscribe, e-mail: [EMAIL PROTECTED]
Re: For additional commands, e-mail: [EMAIL PROTECTED]
Re: 
Re: 

-- 

_______________________________________________
FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Make PC-to-Phone calls with Net2Phone.
Sign-up today at: http://www.net2phone.com/cgi-bin/link.cgi?121





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to