RE: Tomcat on Windows: advantages of running as a service?

2005-10-12 Thread Peter Crowther
 From: Tom Burke [mailto:[EMAIL PROTECTED] 
 Sent: 12 October 2005 11:18
 To: Tomcat Users List
 Subject: Tomcat on Windows: advantages of running as a service?
 
 I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to 
 automatically shut it down  restart it. One way is to control it via 
 shutdown.bat  startup.bat, and run these as scheduled tasks at (say) 
 3:30am and 3:31am. However, I've noticed that while shutdown.bat will 
 shut it down if it was previously started as a service, startup.bat 
 won't run it as a service, it starts it at a command prompt.

Why not use net stop servicename and net start servicename with the
name of the Tomcat service?

 My question is: does this matter? If I'm running on Windows are there 
 any advantages to running Tomcat as a service? Or disadvantages to 
 running from the command prompt?

If you run it as a service: you can ensure it restarts if the machine
reboots unexpectedly for any reason; you can take actions if the service
crashes; and you can run the service as a specified user fairly simply.
If you run from the command line, you have none of these options.

- Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat on Windows: advantages of running as a service?

2005-10-12 Thread Ben Souther
The net start service name and net stop service name commands
will allow you to stop and start Windows services from the command line
(and thus from a batch script).  You can get the service name from the
Services property window.








On Wed, 2005-10-12 at 06:18, Tom Burke wrote:
 I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to 
 automatically shut it down  restart it. One way is to control it via 
 shutdown.bat  startup.bat, and run these as scheduled tasks at (say) 
 3:30am and 3:31am. However, I've noticed that while shutdown.bat will 
 shut it down if it was previously started as a service, startup.bat 
 won't run it as a service, it starts it at a command prompt.
 
 My question is: does this matter? If I'm running on Windows are there 
 any advantages to running Tomcat as a service? Or disadvantages to 
 running from the command prompt? The server is dedicated to tomcat, by 
 the way.
 
 Tom Burke 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat on Windows: advantages of running as a service?

2005-10-12 Thread Dale, Matt


Running from a service makes it a no brainer to start up tomcat when you reboot 
the machine as it does it automatically.

Disadvantages I would see is that it hides the console and makes it difficult 
to changes options like JAVA_OPTS.

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: 12 October 2005 12:12
To: Tomcat Users List
Subject: Re: Tomcat on Windows: advantages of running as a service?


The net start service name and net stop service name commands
will allow you to stop and start Windows services from the command line
(and thus from a batch script).  You can get the service name from the
Services property window.








On Wed, 2005-10-12 at 06:18, Tom Burke wrote:
 I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to
 automatically shut it down  restart it. One way is to control it via
 shutdown.bat  startup.bat, and run these as scheduled tasks at (say)
 3:30am and 3:31am. However, I've noticed that while shutdown.bat will
 shut it down if it was previously started as a service, startup.bat
 won't run it as a service, it starts it at a command prompt.

 My question is: does this matter? If I'm running on Windows are there
 any advantages to running Tomcat as a service? Or disadvantages to
 running from the command prompt? The server is dedicated to tomcat, by
 the way.

 Tom Burke


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


*
This E-mail may be confidential and may also be
legally priviledged. If you are not the intended
recipient, please notify us immediately; You should
not copy it or use it for any purpose, nor disclose
its content to any person. E-mail may be subject to
data corruption accidentally or deliberately. For
this reaszon it is inappropriate to rely on advice
contained in an e-mail without obtaining written
confirmation of it first.
Authorised and regulated by the Financial Services Authority
*

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]