Howdy,
I would point out a couple of things, since you posted this code as an
example, but they are subjective.

>I have a servlet that is loaded at the time tomcat starts.

The container is free to destroy and reload this servlet as it deems
necessary.  Accordingly, use a ServletContextListener instead.

>   DOMConfigurator domConfig;

Should be private?  And inside the method rather than a servlet instance
variable?

>then in the class (bean) that has no idea about the context i have the
>following:
>   protected org.apache.log4j.Logger logWriter =
>   org.apache.log4j.Logger.getLogger("nameoffiletoappearinlog");

Why is this protected?  You almost always want loggers to be private
(static, and final).

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to