Overview of tc Server Directories, Variables, and Configuration Files

When you install the tc Runtime component, you simply unpack the appropriate *.zip or *.tar.gz file into the main installation directory. This action creates a springsource-tc-server-edition subdirectory, where edition refers to the edition of tc Server that you are using (standard or developer.) This subdirectory in turn contains the following tc Server-related files and directories:

tc Server Variables

tc Server uses the following variables:

  • CATALINA_HOME. Root directory of your tc Runtime installation.

    The CATALINA_HOME variable points to the directory INSTALL_DIR/vfabric-tc-server-edition/tomcat-version, where INSTALL_DIR is the directory in which you installed tc Server (such as /opt/vmware); edition refers to the edition of tc Server you are using (developer or standard); and version is the version of the underlying Tomcat, such as 6.0.30.A.RELEASE.

  • CATALINA_BASE. Root directory of a particular tc Runtime instance.

    This directory contains the instance-specific files, such as the conf/server.xml file that configures this particular instance. If you created a tc Runtime instance called myserver and you are using the Standard Edition, then the CATALINA_BASE of the instance is INSTALL_DIR/springsource-tc-server-standard/myserver by default.

The following variables are "exposed" by tc Runtime, which means that you can set them or use them in your environment (or in the bin/setenv.sh file of your tc Runtime instance) to achieve the specified results:

  • CATALINA_OUT. Unix only. Use this environment variable to specify a file to which a tc Runtime instance writes stdout and stderr messages. If you do not set this environment variable explicitly, the tc Runtime instance writes stdout and stderr messages to the file CATALINA_BASE/logs/catalina.out.

    For example, to specify that the tc Runtime instance write its stdout and stderr messages to /opt/vmware/tcserver/tcruntime-instance-6.log, set the variable in your environment or setenv.sh as follows:

    CATALINA_OUT=/opt/vmware/tcserver/tcruntime-instance-6.log
  • INSTANCE_NAME. Name of the tc Runtime instance. You can use this variable to create other unique variables within configuration scripts.

    For example, on Unix platforms you can update the bin/setenv.sh file to use the name of the tc Runtime instance when defining the CATALINA_OPTS variable as follows:

    CATALINA_OPTS="-Dinstance.name=$INSTANCE_NAME"

    On Windows, the equivalent change would be to the conf/wrapper.conf file as follows:

    set CATALINA_OPTS=-Dinstance.name=%INSTANCE_NAME%
  • INSTANCE_BASE. Specifies the parent directory of the tc Runtime instance. The full pathname of the tc Runtime instance directory would be $INSTANCE_BASE/$INSTANCE_NAME.

    You can use the INSTANCE_BASE variable in the same way as the INSTANCE_NAME variable, as described in the preceding bullet.

tc Runtime Instance Directory Structure

After you create a new tc Runtime instance, its CATALINA_BASE directory contains the following subdirectories:

  • bin. Contains the tcruntime-ctl.* scripts to start and stop tc Runtime instances, as well as the setenv.* scripts. The *.sh Unix files are functional duplicates of the *.bat Windows files.

  • conf. Contains the configuration files for the tc Runtime instance, such as server.xml, catalina.properties, web.xml, context.xml, and so on.

  • lib. Contains resources shared by all Web applications deployed to the tc Runtime instance.

  • logs. Location of the logs files.

  • webapps. Deployment directory for the Web applications deployed to the tc Runtime instance.

  • work. Temporary work directory for all deployed Web applications.

  • temp. Directory used by the JVM for temporary files.

tc Runtime Instance Configuration Files

You configure a particular tc Runtime instance by changing its configuration files (either by editing the XML file manually or through the Hyperic user interface). Other topics in this documentation describe how to do this. All the configuration files for a tc Runtime instance are located in its CATALINA_BASE/conf directory. The most important configuration files are as follows:

  • server.xml. Main configuration file for a tc Runtime instance. It configures the behavior of the servlet/JSP container.

    By default, the server.xml file for a tc Runtime instance uses variable substitution for configuration properties that must be unique across multiple tc Runtime instances on the computer, such as HTTP and JMX port numbers. These variables take the form ${var}. For example, the variable for the HTTP port that the tc Runtime instance listens to is ${http.port}. The specific values for these variables for a particular tc Runtime instance are stored in the catalina.properties file, in the same directory as the server.xml file.

  • catalina.properties. Properties file that contains the tc Runtime instance-specific values for variables in the server.xml file.

  • context.xml. Configures the context that is loaded by all Web applications deployed to the tc Runtime instance.

  • web.xml. Default web.xml file that is loaded by all deployed Web applications, in addition to their individual web.xml files.

  • wrapper.conf. Windows only. Configures the Java Service Wrapper from Tanuki Software used to install the tc Runtime instance as a Windows service. The Wrapper correctly handles user log outs under Windows, service dependencies, and the ability to run services that interact with the desktop.

  • jmxremote.access and jmxremote.password. Configures the JMX users and passwords.

  • logging.properties. Configures the logging system of the tc Runtime instance.