Eddie,

Nobody's probably jumping to answer your more general question because the
NDC mechanism is very flexible - it is impossible to say "this is THE right
way to use it", simply because there are so many different ways that you
could use it, for many different purposes.  Having said that, the answer to
your newer question is more straightforward (which is why you're getting
more than one answer!).  NDC follows the thread of execution: in your
example, because you call your second class from the servlet, the thread of
execution moves from your servlet to your other class, and the NDC stack is
built to reflect this.  In this way, it's just like the standard Java
execution stack.  Different servlets, OTOH == different threads == different
NDC stacks.  Do you understand?

Thus, the answer to (part) of your original question is: no, the NDC is not
bound to any specific Category instance.  It's bound to the thread of
execution that pushes the first item onto its stack.  Once you understand
this, the answers to the rest of your questions (which are *very* dependent
on the details of your own code) are usually fairly self-evident.

Cheers,
Mark


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

Reply via email to