Hi, When using *Apache commons daemon - procrun* to run Java apps on Windows XP 32 bit platform, how to gracefully stop service before OS shut down/reboot?
I have read *procrun* documentation and set time out 120 seconds while registering service. While searching on internet found that Windows service has a structure<http://msdn.microsoft.com/en-us/library/windows/desktop/ms685996%28v=vs.85%29.aspx> and this is included in procrun<http://svn.apache.org/repos/asf/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_4/src/native/windows/apps/prunsrv/prunsrv.c> . Now the question is how to register a service using procrun with states 1. ACCEPTS_SHUTDOWN 2. NOT_PAUSABLE The above states can be found for any service on Windows XP by using the command sc query <service-name> *FYI:* Service stopping using any of the below three ways is graceful 1. net stop service-name 2. service-name.exe stop 3. services.msc Thank you, With regards, Radheshyam L MCRUNCHER R&D SDN BHD +601 0760 3922 *“If you hire people just because they can do a job, they’ll work for your money. But if you hire people who believe what you believe, they’ll work for you with blood and sweat and tears.” — Simon Sinek*
