Is there a way i can handle abrupt termination of my java program in code ( like finally available for the try block)?
My program is a JMS Thread and users can either run it locally on their eclipse or as a Windows Service (not yet implemented).
I would like to handle hard stop like Terminate in Eclipse in code / stop service using Windows -> Services admin tool.
I would like to just print a log.error ("Stopping JMS Service abruptly...."); at the end.
posted 4 years ago
Is there any finally block to handle thread termination?