Thanks John, Yes the nesting does increase over time but it might only start 70% of the way through a volume test. As to your second question, No there are some data declarations before the try/finally block
public void onMessage(Message msg) { byte[] msgData = new byte[1000]; int VPSid = 0; int lineNumber = 0; int sequenceNumber = 0; int msgType = 0; boolean NDCSet = false; byte[] VSSessionKey = new byte[24]; DefaultVPSQueueWriter qWriter = null; String sourceAddress; String conversationId; RouterMessage routerMessage = null; IcomApplicationMessage icomMessage = null; try and the finally has another clean up method call. finally { if (qWriter != null) { queueWriterManager.returnQueueWriter(qWriter); // return queuewriter to pool } if (NDCSet) { NDC.pop(); } } In the Log4j logs or the Weblogic logs I have seen no indication of any exceptions in the MDBs onMessage() method. I might try swapping the order of the above but I did want to see the NDC in the log message from returnQueueWriter() I appreciate your comments Regards Bill -----Original Message----- From: John Volkar [mailto:[EMAIL PROTECTED]] Sent: 07 February 2002 12:10 To: Log4J Users List Subject: RE: Nested NDC output from Weblogic Does the "multiple nested NDC headers" appear to accumulate over time. That is does the amount of nesting keep increasing? I take it that you of course put the entire body of .onMessage() in a try/finally block and your call to NDC.pop() is the only thing in the finally block. <scratching head> if you can provide any further info I'll puzzle on it. John Volkar -----Original Message----- From: bill pope [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 12:50 PM To: Log4J Users List; [EMAIL PROTECTED] Subject: RE: Nested NDC output from Weblogic Thanks for the response Adam. It seems that I get the behaviour on any of the weblogic managed threads. Like you I am more concerned that I am doing something wrong and this is a symptom. Oh well it's a real puzzle. regards Bill -----Original Message----- From: ajack [mailto:[EMAIL PROTECTED]] Sent: 06 February 2002 16:42 To: 'Log4J Users List' Subject: RE: Nested NDC output from Weblogic Hi Bill, We had a problem like this under the Sybase app server, which I reported to log4j list a month or so ago, after we'd examined our own usage of NDC ('cos were worried we were doing things wrong). After a lot of head scratching, nothing seemed wrong, we finally noticed that this only happened when "Thread=0" was also displayed, as if this was some special thread to log4j. I can not be certain (partly 'cos nobody has contacted me about the 'bug' or 'feature') but I believe that this is something inside log4j. Perhaps it is a feature, it considered the thread it was initialised in to be the primary thread (thread 0), but unfortunately all threads are up for grabs in some implementations of an app server. Take a peek if it is thread-0 --- and if it is I doubt it is under your control, sorry. I was using log4j 1.1.3, not sure about later versions.. regards Adam -----Original Message----- From: bill pope [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 9:17 AM To: [EMAIL PROTECTED] Subject: Nested NDC output from Weblogic Hi, We are developing an MDB driven application with Weblogic6.1 and sp2. We are using log4j for all our logging. The MDB that receives client requests uses the NDC class to set a context for all subsequent log messages produced during the processing of the client message. This allows us to tie together all the log messages for a given client request message. This context is cleared at the end of the onMessage() method of the MDB. This has worked perfectly in development and light load testing. However under heavy loads we have found that multiple nested NDC headers are being set in the log messages. The usually reason for such behaviour would be the context being set with an NDC.push() and not being cleared with an accompanying NDC.pop(). I can find no evidence of this and the MDB is the only place that NDC methods are invoked I had thaought that this behaviour could occur if during the processing of the MDBs onMessage() method the methods being called were running on different threads from the controlling MDB. ( according to the log4j docs an NDC is tied to the thread that it is "pushed on"). I have asked BEA and they say that when WLS starts a client request on a thread all subsequent method invokes are run on this initial thread. I know I could issue an NDC.clear() rather than a NDC.pop() but I would like to understand why the problem is occuring. Any thoughts or ideas would be greatly appreciated. Thanks Bill -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>