How to start a Tomcat instance as a Windows service instead of using a Startup script generated by the Domain Utility?

How to start a Tomcat instance as a Windows service instead of using a Startup script generated by the Domain Utility?

book

Article ID: KB0092623

calendar_today

Updated On:

Products Versions
TIBCO iProcess Insight -
Not Applicable -

Description

Resolution:
Description:
============
When Tomcat is registered with TIBCO Domain using Domain Utility, a Startup script is generated with TIBCO parameters that are required during Tomcat startup. If Windows service needs to be used instead of the Startup script, modify Tomcat Windows service to add TIBCO specific parameters.  Windows service can be created in case Windows service does not exist for the Tomcat instance.

Environment:
===========

- TIBCO iProcess™ Insight version 2.2.0 or higher
- TIBCO Runtime Agent™ (TRA) version 5.6.0 or higher
- TIBCO Administrator™ version 5.6.0 or higher
- Apache Tomcat version 5.0.28, 5.5.x
- Windows Server 2003

Resolution:
===========

Steps to create Windows service are:

1). Open service.bat available in &ltTomcat home>\bin directory for editing.

2).  Use the following command to create the service:
service install &ltservice name>, for example - service install instance2

More information about this can be found in the service.bat file and in the Tomcat Documentation.

Steps to modify Tomcat Windows service are:

1). Launch &ltTomcat home>/bin/tomcat5w.exe .

2). From the "Java" tab, set Java Classpath and Java options as follows (Look in the Startup script generated by Domain Utility on the target setup and ensure all the variables in the Startup script are added and values match with the target setup):

Java Classpath:
C:\tibco\bf\5.2\db\lib\classes14.jar;C:\tibco\bf\5.2\..\plugins\lib\ssoJBase.jar;C:\Program

files\Java\jdk1.5.0_08\lib\tools.jar;C:\tibco\tra\5.4\hotfix\icjava\6.2\lib\icjava621.jar;C:\tibco\tra\5.4\icjava\6.2\lib\icjava621.jar;C:\tibco\tra\5.4\hotfix\lib\TIBCrypt.jar;C:\tibco\tra\5.4\lib\TIBCrypt.jar;C:\tibco\tra\5.4\..\dependency\default\TPCLlib5.4.jar;C:\tibco\tra\5.4\..\dependency\default\HAWKlib.jar;C:\tibco\tra\5.4\..\dependency\default\RVlib.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\bootstrap.jar;

Java Options:
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 5.5\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\logging.properties
-DTIBCO_DOMAIN_NAME=test
-DTIBCO_DOMAIN_HOME=C:\tibco\tra\domain
-Dcom.inconcert.icjava.mimetypes=C:\tibco\tra\5.4\config\IcJavaMIMETypes.txt
-DTIBCO_HAWK_HOME=C:\tibco\hawk
-DTIBCO_TRA_HOME=C:\tibco\tra\5.4
-DTIBCO_TRA_VERSION=5.4
-Djava.library.path=C:\tibco\tibrv\bin;C:\tibco\tra\5.4\hotfix\icjava\6.2\bin;C:\tibco\tra\5.4\icjava\6.2\bin;C:\tibco\tpcl\5.4\bin;C:\tibco\tra\5.4\hotfix\bin;C:\tibco\tra\5.4\bin;C:\tibco\tibrv\lib;C:\tibco\bf\5.2\db\bin;C:\tibco\bf\5.2\..\plugins\bin
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

Note: In the list of Java Options ensure there is no space after any of the Options lines otherwise it will not work.

Issue/Introduction

How to start a Tomcat instance as a Windows service instead of using a Startup script generated by the Domain Utility?