BigMemory 4.3.7 | Product Documentation | BigMemory Max Administrator Guide | Starting the Terracotta Server as a Windows Service | Configuring the Terracotta Server to Run as a Service
 
Configuring the Terracotta Server to Run as a Service
A Windows service supports scheduling and automatic start and restart. You might want to run the Terracotta Server Array, which is a Java application, as a Windows service. If so, use the Service Wrapper located inside the kit at $installdir/server/wrapper (or, for 3.7, $installdir/wrapper).
Note:
When using the wrapper for setups with more than one server per stripe (e.g., including mirror node), ensure that the following property is entered in the wrapper config: "wrapper.disable_restarts.automatic=TRUE".
Set JAVA_HOME
To start the service, set your JAVA_HOME in conf/wrapper-tsa.conf. For example:
set.JAVA_HOME=C:/Java/jdk1.7.0_21
The wrapper does not read your JAVA_HOME from the environment. For Windows, if you do not want to set it in the configuration file, comment it out and set JAVA_HOME in the registry instead.
Configuration Files
For the TSA, you need the conf/tc-config.xml configuration file. Overwrite this file with your own. If you want to change the file name, modify the name in the wrapper configurations.
Modify the TSA conf/wrapper-tsa.conf file to match the server name in your tc-config.xml:
set.SERVER_NAME=server0
where server0 represents the name of the server you want to start.
Set Permissions
The services are controlled by an Administrator user, so you have to confirm for every action, such as install, start, stop, remove.
In addition, the Administrator user needs to have read/write permission for the "wrapper" directory.
Install and Start the Service
The wrapper service is located at $installdir/server/wrapper.
To install the service wrapper, run the script with the install parameter:
%> bin/tsa-service.bat install
Then you can either start/stop the service:
%> bin/tsa-service.bat start
%> bin/tsa-service.bat stop
If you want to remove the service:
%> bin/tsa-service.bat remove
There are more commands available when you run the script without any parameter:
%> bin/tsa-service.bat
Changing Wrapper Configuration
There are comments in wrapper-tsa.conf to explain each parameter. If you need to modify JVM system properties, classpath, or command line parameters, follow the current pattern. Pay close attention to their numerical order and parameter counts.
For more information, see http://wrapper.tanukisoftware.com/doc/english/properties.html.