Hi All,
I am writing a container, perhaps analogous to a servlet container. I
use my own custom classloaders to reload classes. Classloader trickery
is the way I would like to isolate my log4j universes. However, when I
use log4j, my classloaders do not get garbage collected.

public class A{
        // instance property of class A:
        protected Logger logger = Logger.getLogger(A.class);

        // instance method on class A:
        public void shutdown(){
                //some shutdown stuff
                LogManager.shutdown();
        }
}

shutdown() is called on the instance of A from outside A's classloader
using reflection.
If log4j is not used, A's classloader gets GC'ed, if it log4j is used,
classloader is not GC'ed.

Any suggestions much appreciated.

regards,

James.
=====================================================
 
T:      +44 (0)1179081253 (Direct)
M:      +44 (0)7855598712
F:      +44 (0)1179081394
E:      [EMAIL PROTECTED]
 
This communication is intended solely for the addressee and is
confidential.
If you are not the intended recipient, any disclosure, copying,
distribution
or any action taken or omitted to be taken in reliance on it, is
prohibited
and may be unlawful.
 
Although this e-mail and any attachments are believed to be free of any
virus, or any other defect which might affect any computer or IT system
into
which they are received and opened, it is the responsibility of the
recipient to ensure that they are virus free and no responsibility is
accepted by Multicom Products Limited for any loss or damage arising in
any
way from receipt or use thereof.


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

Reply via email to