|
From: Ani <jad...@gm...> - 2013-04-26 08:07:22
|
On Fri, Apr 26, 2013 at 1:08 PM, <wra...@li...
> wrote:
> <chr...@ta...>
>
Perfect , application launched and running successfully. Thank you Sir.
But my clear up activity process are nt getting called on service stop.
I have registered shutdown hook in my main class , i.e. EmbeddedJettyServer
and the spring controller
in @preDestroy files.
--------------------------------------------------------
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
@Override
public void run() {
System.out.println("%%%%%%%%%%%%% in shutdown hook");
sLogger.info("%%%%%%%%%%%%% in shutdown hook");
}
}));
--------------------------------------------------------------------
@PreDestroy
public void dispose() {
sLogger.info("***********************in dispose PC");
System.out.println("***********************in dispose PC");
}
------------------------------------------------------------------------------------
Below is the log when I ctrl + c or service stop
wrapper | CTRL-C trapped. Shutting down.
wrapper | CTRL-C trapped. Forcing immediate shutdown.
wrapper | JVM did not exit on request, terminated
wrapper | <-- Wrapper Stopped
--Ani
Pl Save the environment. Please don't print this email unless you really
need to.
|