I am running a Java service to poll data from database. In my class, I have a thread, which looks for data in db every 5 seconds... At particular time(say like 6 PM when out of business hours), i make my thread to sleep to some configured time delay.
Problem: when I make my thread to sleep, it seems my Java service is restarted... Why am I getting 4, 5 JVM launched... Please help me to understand....
ERROR | wrapper | 2013/12/21 15:40:10 | JVM did not exit on request, termination requested.
STATUS | wrapper | 2013/12/21 15:40:10 | JVM exited after being requested to terminate.
STATUS | wrapper | 2013/12/21 15:40:14 | Launching a JVM...
INFO | wrapper | 2013/12/21 15:40:14 | Command: "C:\Windows\system32\java.exe" -Dfile.encoding=Cp1252 -Duser.language=en -Djava.library.path="../lib" -classpath "java-windows-OSN-service.jar;../lib/wrapper.jar;../lib/log4j-1.2.15.jar;../lib/sqljdbc4.jar" -Dwrapper.key="PHie-UB6SOJ9BBlfqJKjPuopQ40gFfnH" -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=6116 -Dwrapper.version="3.5.22-pro" -Dwrapper.native_library="wrapper" -Dwrapper.arch="x86" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=4 -Dwrapper.lang.domain=wrapper -Dwrapper.lang.folder=../lang com.servion.service.ServiceController
INFO | jvm 4 | 2013/12/21 15:40:15 | Control Event: 1
ERROR | wrapper | 2013/12/21 15:40:43 | Startup failed: Timed out waiting for a signal from the JVM.
Just a hunch, but my guess is that when you make your application sleep, you also stop the watchdog mechanism from Tanukisoft to respond to probes, so Tanuki thinks your application is frozen.
Have a look at the integration methods for standalone apps with Tanukisoft : http://wrapper.tanukisoftware.com/doc/english/integrate.html