|
From: Leif M. <le...@ta...> - 2007-06-04 13:05:01
|
Method 3 will work. But you most likely do not need to do that. Just write a regular standalone Java application which registers a shutdown hook. Run that under Method 1 and you should be set. Your class's main method will be run on startup and the shutdown hook on shutdown. If and only if you find you need finer control. you can try out Method 3. You almost never need to do so however. Cheers, Leif san...@li... wrote: > Hi, > > I've written a Java application that does some temperature monitoring in my house. > > I'd like to have the application run as a service, and start/stop it with net start myapp/net stop myapp and so on. For this, I'm looking at JSW for this purpose. > > I have some doubts: > > 1) Which integration method it the best for this purpose? I think #3, but maybe I'm wrong and the things can be easier. > 2) Which environment it needs? An application server like tomcat or jboss or jdk is enough > 3) Am I correct if I say that JSW gives an application the "hooks" to be managed like a service, i.e. with JSW it can handle the "start service" and the "stop service" coming from win32 OS's? > > Thanks in advance > > sandman42 |