|
From: Leif M. <le...@ta...> - 2005-10-10 22:31:07
|
Russell, The restart functions are really only designed to restart a JVM which "fails" in any one of a number of ways. It sounds like in your case, the Java application is completing without problems and exiting normally. The Wrapper is handling this correctly by exiting. Is there a reason why you don't just create a thread within your JVM that runs an operation every 15 minutes? This way the JVM stays up. That would have the disadvantage of having the JVM take up memory while it is idle... One way that you could make this work is to add the following configuration properties to your wrapper.conf file. wrapper.on_exit.0=RESTART wrapper.restart.delay=900 See the following: http://wrapper.tanukisoftware.org/doc/english/prop-on-exit-n.html http://wrapper.tanukisoftware.org/doc/english/prop-restart-delay.html That should override the default shutdown behavior and queue up a restart when the JVM exits normally. Let me know how this works as I didn't actually try it just now... You might want to use a different exit code to trigger the restart so you have a way to actually cause the cycle to stop. Use System.exit(1) or something. Cheers, Leif Russell Brown wrote: > Unless I’m completely misunderstanding the instructions I assumed that > the wrapper would constantly run and it would rerun my sub app on a > desired time patter via > > wrapper.restart.delay. How ever my application starts up, runs once > and the shuts down cleanly. Right now for testing tell my thread to > just rerun 15 minutes after it ends, which doesn’t seem right. > > To clarify, I want to basically run my java app every 15 minutes, but > I want to run it as a service, because there is a large chuck of start > up code/processing that I want to do once not 4 times an hour. Someone > please help, yes I’ve searched the archives and help and found other > similar questions that were either unanswered or had completely > confusing ones that didn’t seem to answer the actual question. > > Here is my configuration file… > > ---------------------------------------------------------------------------------------------- > wrapper.java.command=D:\Java\jre_1.4.2\bin\java.exe > > wrapper.java.mainclass=com.POM.feedMonitor.Service > > wrapper.working.dir=D:\Java\Applications\FeedMonitor > > wrapper.console.format=PM > > wrapper.console.loglevel=DEBUG > > wrapper.logfile=D:/Java/Applications/FeedMonitor/wrapper.log > > wrapper.logfile.format=LPTM > > wrapper.logfile.loglevel=DEBUG > > wrapper.logfile.maxsize=0 > > wrapper.syslog.loglevel=NONE > > wrapper.console.title=Feed Monitor > > wrapper.ntservice.name=Feed_Monitor > > wrapper.ntservice.displayname=Feed Monitor > > wrapper.ntservice.description=Feed Monitor > > wrapper.ntservice.starttype=AUTO_START > > wrapper.ntservice.interactive=false > > wrapper.restart.delay=900 > > wrapper.ping.interval=15 > > ---------------------------------------------------------------------------------------------- > |