|
From: Riyaz S. <riy...@mi...> - 2009-10-12 06:39:11
|
Hi,
I tried extending WrapperSimpleApp to implement stop method and added some
debugging statements. It seems to be not executing. What is the best way to
implement shutdown hook?
class:
public class MyWrapperApplication extends WrapperSimpleApp
{
....
....
@Override
public int stop ( int exitCode )
{
if ( logService.isInfoEnabled ( ) )
{
logService.info ( "Print Service Shutting down." );
}
return super.stop ( exitCode );
}
}
configuration:
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=java
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=printservice.bootstrap.MyWrapperApplication
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=../wrapperLib/wrapper.jar
wrapper.java.classpath.2=../applicationLib/*.jar
wrapper.java.library.path.1=../wrapperLib
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
# Java Additional Parameters
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=64
-----
Regards,
Riyaz..
--
View this message in context: http://www.nabble.com/How-to-implement-shutdown-hook-tp25851139p25851139.html
Sent from the Java Service Wrapper mailing list archive at Nabble.com.
|