How to run the CA XCOM GATEWAY and/or the XCOM MANAGEMENT CENTER as a Windows service.
search cancel

How to run the CA XCOM GATEWAY and/or the XCOM MANAGEMENT CENTER as a Windows service.

book

Article ID: 22060

calendar_today

Updated On:

Products

XCOM Data Transport XCOM Data Transport - Windows XCOM Data Transport - Linux PC XCOM Data Transport - z/OS

Issue/Introduction

This document explains how to setup a Windows service to run the XCOM GATEWAY and/or the XCOM MANAGEMENT CENTER.

It is certainly not the only way to have an application started when the system boots up, but sites might want to do that, for example, to allow handling it together with other system components.

 

Environment

Release:
Component: XCGWIN

Resolution

Step 1: If not already done, download and install the JavaService package (see additional information for details)

Step 2: Create and run a script similar to the following to define the service to Windows

c:                                                                           
cd %JBOSS_HOME%\bin                                                          
rem 
rem make a copy of the executable so that it can be easily identified in task manager displays
rem
copy C:\JavaService-2.0.10\JavaService.exe %JBOSS_HOME%\bin\JBossService.exe 
rem
rem install the service. Everything goes to a single line and has been aligned for readability
rem
JBossService.exe 
 -install JBoss     <- install command. Names the service
 %JAVA_HOME%\jre\bin\server\jvm.dll               <- Java library
 ... Java options start here .....
 -Djava.class.path=%JAVA_HOME%\lib\tools.jar;%JBOSS_HOME%\bin\run.jar 
 -Xms128m -Xmx1024m
 -XX:MaxPermSize=256m 
 -Djava.net.preferIPv4Stack=true 
 -Dsun.rmi.dgc.client.gcInterval=3600000 
 -Dsun.rmi.dgc.server.gcInterval=3600000 
 ....   end of Java options   ......
 -start org.jboss.Main                 <- class used at startup
 -stop org.jboss.Main                  <- class used at shutdown
 -method systemExit                    <- class' method used at startup
 -out %JBOSS_HOME%\stdout.log          <- stdout redirection
 -err %JBOSS_HOME%\stderr.log          <- stderr redirection
 -current %JBOSS_HOME%\bin             <- current directory
 -depends mysql                                <- service dependencies
 -manual                               <- service startup method
 -overwrite                            <-overwrite stdout and stderr

Step 3: Create also a script similar to the following to uninstall the service when needed

c:
cd %JBOSS_HOME%\bin
JBossService.exe -uninstall JBoss

Step 4: Changing the service parameters

If some of the above parameters need to be changed after the service is installed, it may be done either by uninstalling/installing the service again or by editing the service parameters in the Windows registry, under key HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ {SERVICE_NAME}\ Parameters.

The exact variable names can be found in the JavaService documentation.

 

Additional Information

IMPORTANT: This article contains information about modifying the registry.
Before you modify the registry, make sure to create back up of the registry and ensure that you understand how to restore the registry if a problem may occur.
For more information about how to back up, restore, and edit the registry, please review the relevant Microsoft Knowledge Base articles on support.microsoft.com.

ABOUT JAVASERVICE

JavaService is a software package distributed under the GNU LesserGeneral Public License (LGPL). Its purpose is to define Windows services that will run Java applications like jBoss, and therefore can be used to define the XCOM Management Center and/or Gateway as Windows services.

The full documentation for JavaService can be found in the /docs folder after downloading the product. It executes from the command prompt and has commands to install and uninstall the Windows services.