On Aug 18, 2008, at 6:35 AM, Martin Kalany wrote:
Hi folks,
When I use the profiling tool off the Netbeans 6.1 IDE, I see lots
of Threads that got the name "org.apache.log4j.xml.XMLWatchdog".
Unfortunately I didn't find much documentation about that, that's
why I'm posting here.
My problem is that there's lot's of threads (about 5 per instance of
B) with this name when I profile code that looks like the code
below. Why is that? Does log4j really need them? The profiler says
they are waiting all the time.
Regards,
Martin
XMLWatchdog implement the file change monitoring in
DOMConfigurator.configureAndWatch. One new instance would be created
each time you call configureAndWatch, but should not be created if you
just call configure. When they are used, they sleep for a specified
period of time, wake up, check if the configuration file has changed
and call configure if it has and then sleep again, so it would be
normal for them to be waiting.
I would suggest checking your code for calls to configureAndWatch to
see where they are being created. If you can't find any instances in
your code, set a breakpoint on the XMLWatchdog constructor and then
look at the stack trace to see where they are being created.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]