[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Problem with NDC
do-not-reply at jboss.com
Fri Jun 26 08:40:53 EDT 2009
i'm not sure if this is the right section for my post,
but i couldn't find something more suitable...
I'm working on a tapestry application and we found out,
that it would be very helpful using NDC to assign every log message to the user who triggered it.
After tapestry provides the method pageBeginRender() and pageEndRender(), which are called before and after rendering of each page, it put the NDC.push() method in the pageBeginRender-method and NDC.pop() and remove() to pageEndRender().
I made these changes and testet the result in my local development environment and saw that everything worked. (My local environment consists of a JBoss and a standalone Tomcat, because in our case this is more comfortable for GUI development)
After checking in these changes and taking a look into the logfile of our nightly build server (which is using no standalone tomcat but just one JBoss) i saw that some log messages include the information added via NDC and others do not.
After a more exact view on the logfile, i think that the problem is the following:
When we are calling a ejb-method (which calls push(), pop() and remove() on her part) on a page, the ejb-method's pop() also affects my NDC in Webclient?!?
If this is really the problem, i'm wondering why our serverside code runs in the same thread than the WebClient?!?
I would be grateful about every hint you can give me onthis topic, thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240337#4240337
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240337
More information about the jboss-user