I recently was looking at Niall's source code for LazyDynaBean and saw that he defines his logger this way:

*   private* *transient* Log logger = LogFactory.getLog(LazyDynaBean.*class*);
.......

  *private* Log logger() {
       *if* (logger == *null*) {
           logger = LogFactory.getLog(LazyDynaBean.*class*);
       }
       *return* logger;
   }


I have been using this as the standard :
private static Log logger = LogFactory.getLog(MyClass.class);

Is there some advantage to defining the logger as private transient?
Does this somehow allow avoid memory leaks where the classloader cannot be garbage collected?

--
Mark Shifman [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to