J.Pietschmann wrote:

Mutable static data, like a static logger reference, interferes
severely with using FOP in an MT environment, because this means
"one thread rendering globally" rather than "one thread per FO
processor rendering, perhaps using multiple processors, each one
in a separate thread."

I believe the same logger reference would just be used with each thread instead, written to by multiple threads (which is another problem, but not this one.) Further, commons loggers are instantiated with a log name, usually the class name where it appears, with the same logger used only if the log name is the same.

We probably still have some unnecessary get/set logger references, such as in FOUserAgent, no longer needed due to the architecture of Commons Logging (i.e., any class doing logging can now call a LogFactory to get a logging instance.) Getting rid of them would possibly alleviate some of these issues. Also, I'm not certain of the need for logging, at least to the degree that we are doing it--many other applications at our level or below--Xerces, Xalan, Batik, compilers--don't bother with it, relying on System.out/err.println() or glorified versions thereof.


Reply via email to