On Wednesday, 27. June 2001 12:07, you wrote:
> Is finalise always called on JVM shutdown?  Not log4j specific, but I
> wasn't sure if finalise was called when the JVM exits.

You'r right, finalize is not guaranteed to be called, because the jvm may 
terminate (normally) without calling the garbage collector, so my idea of 
calling "sendBuffer()" in finalize()  does not work.

What worked, was adding a (Runtime) ShutdownHook in the constructor of a 
subclassed SMTPAppender, but I'm unsure if that should be build in in the 
SMTPAppender itself.

Marco
-- 
Marco Ladermann
dpa, Deutsche Presse-Agentur GmbH
[EMAIL PROTECTED] (PGP-Schlüssel auf Anfrage)
Tel. +49 40 4113 2414   Fax  +49 40 4113 2479

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

Reply via email to