Multiple Tomcat Instances as a Service
Yesterday I posted how to set up Multiple instances of Tomcat running Railo. The whole setup turned out to be relatively painless.
Running the multiple instances as a service is a small improvement that can make life a little easier. A small adjustment to the service.bat file is all that is needed in the Windows environment, a startup script for the linux environment could also be made/modified in a similar way.
Service_Instance.bat
The first thing is to make a copy of service.bat and save it as service_instance.bat, once you have done that edit the service_instance.bat file and modify it.Go down to line 63 and make the following changes
if "%1" == "" goto displayUsage
if "%2" == "" goto setServiceName
if "%3" == "" goto displayUsage
set SERVICE_NAME=%2
set PR_DISPLAYNAME=Railo 3.1 %2
set CATALINA_BASE=%3
:setServiceName
if %1 == install goto doInstall
if %1 == remove goto doRemove
if %1 == uninstall goto doRemove
echo Unknown parameter "%1"
:displayUsage
echo.
echo Usage: service.bat install/remove [service_name] [path_to_instance]
goto end
Save the file and then in a command prompt window you can do the following:
d:\tomcat6\bin>service_instance.bat install instance1 d:\tomcat6\server\instance1
When you check the windows Services you should see Railo 3.1 Instance1 as a new Service name. You should now be able to start/stop the service or set it to automatic.
Happy Coding...

Subscribe
Subscribe via RSS
Follow me on Twitter
Or, Receive daily updates via email.
Tags
adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript max2007 max2008 misc open source programming railo software technology ui
Recent Entries
No recent entries.
Blogroll
An Architect's View
CFSilence
Rey Bango
TalkingTree

There are no comments for this entry.
[Add Comment]