[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some observations



> Shutdown hooks are just nice to have. They don't affect the core engine. So we
> may check at compile time if we are on 1.2 or 1.3 and skip the1.3 classes if on
> 1.2. Could this be an option?

Personally I think it would be better to check this during runtime. I.e., if
there is an addShutdownHook method, we can pretty much assume it's
supported. Since this is a one-time thing, using reflection to invoke the
method is not a problem for performance.

This would mean it both compiles and runs on older VMs, but the added
advantage that it (unmodified) takes advantage of the hook capability of JDK
1.3.

-- 
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0x5584BD98 or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrival: Send an E-Mail to getpgpkey@scode.infidyne.com
E-Mail: peter.schuller@infidyne.com Web: http://scode.infidyne.com