Log4j MDC how to retrieve the values in it when creating an MDB?
0 posts in topic
Flat View  Flat View

Posted By:   vamsee_krishna
Posted On:   Wednesday, November 16, 2005 05:45 PM

I am using MDC to store the session id for logging purposes. In the application, all the tasks that need to be executed are done by publising messages to the queues. So each time a task needs to be run, a message is sent and the message driven bean's onMessage method executes.

I have the values in MDC until MDB is doing its stuff. Since this is a new thread and is not a child of already running thread, it looses the values in MDC and the MDC of this thread is empty. Is there any way around this issue? How can I pass on the MDC values to every other thread that runs other than the current thread.

About | Sitemap | Contact