This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
Joined: May 31, 2011
Is there any finally block to handle thread termination?