This page last changed on Dec 01, 2009 by mmcgarry.

The features described on this page are available in tc Server and tc Server Standard Edition.

Feedback is welcome. Click Add Comment at the bottom of the page.

tc Server Configuration

On this page you can configure the selected tc Server.

Navigating tc Server Configuration Pages


To navigate to the Server Configuration pages of a tc Server instance.

  1. Click Resources > Browse in the HQ user interface.
  2. Click Servers link to list all the servers in inventory.
    • tc Server instances have the server type "SpringSource tc Server 6.0"
    • Apache Tomcat instances have the server type "Tomcat X.X".
  3. Click the name of the tc Server instance to which you want to navigate.
  4. Click the Views > Server Configuration tab.

There are three tc Server configuration pages, each with their own tab beneath the main Views > Server Configuration tab:

  • Configuration - Configure general tc Server options, such as JVM options, JSP behavior, and default options for static content.
  • Resources - Create, configure, and delete JDBC data sources.
  • Services  - Configure the default catalina service, and create new ones. A tc Server service groups together one or more connectors and a single engine. The engine, in turn, groups together one or more virtual hosts.

Saving or Undoing Changes


HQ populates the fields of the tc Server configuration pages from the its configuration files, including:

  • conf/server.xml
  • conf/context.xml
  • conf/web.xml
  • bin/setenv.sh

(All relative to CATALINA_BASE, the root directory of the tc Server instance.)

Each configuration page includes a Save button for saving the changes made in the user interface to the tc Server configuration files. If you try to navigate to a different page without saving any of your updates, HQ asks you if you want to leave the page and lose these updates.

When you click Save to save your changes, a box labeled "Changes have been made locally" is displayed until you click either:

  • Push - to write the configuration changes you have made to the appropriate tc Server configuration file (such as server.xml). If you push the changes, HQ overwrites existing configuration, saving a backup of the overwritten configuration. Most saved changes to the tc Server configuration require a server restart to take effect; HQ flags these cases and provides a link to easily restart the tc Server.
  • Undo - to undo all changes that have been made since the last push or undo.

If you update tc Server configuration settings from the HQ user interface, do NOT manually update the tc Server configuration files at the same time. HQ clears its local memory and reloads the configuration files upon certain events, not continuously.

Configuring General tc Server Options

The main tc Server configuration page includes options to change the Shutdown Port and Shutdown Command.

  1. Navigate to the tc Server configuration pages for the server instance. For instructions, see Navigating tc Server Configuration Pages.
  2. Click the Configuration tab.
  3. Click the General link in the list on the left. For information about the fields on the page, see tc Server Configuration Reference.
  4. Make your changes.
  5. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
  6. To write your changes to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undoing Changes.

For additional detailed information about configuring the tc Server, see The Server Component, in Apache Tomcat documentation.

Configuring Startup Options

The page for configuring tc Server Start settings includes options for configuring the JVM where the instance runs, including minimum and maximum heap size, garbage collection, and debugging options.

NOTE: HQ populates the tc Server Start page with information from the CATALINA_HOME/bin/setenv.sh file of the server instance you are configuring (specifically the JVM_OPTS environment variable.) By default, the bin/setenv.sh file does not exist; you must create it. If you have not created the file, or if the file exists but you have not set the JVM_OPTS environment variable, then the fields in the Server Start page will be blank.

The page allows you to add your own command line arguments to the JVM; be careful using this option because HQ does not validate the options but simply adds them to the Java command that starts tc Server. If you enter them incorrectly, you will get an error starting tc Server.

  1. Navigate to the tc Server configuration pages.
  2. Click the Configuration tab.
  3. Click the Server Start link in the list on the left. For information about the fields on this page, see tc Server Configuration Reference.
  4. Make your changes. 
  5. To add your own JVM command line arguments, click the Advanced link at the bottom and enter them in the form the form "-Xoptionvalue or -XX:option=value, separating options with a space.
  6. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
  7. To write your changes to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undoing Changes.

Configuring the Context Container

Use this page to configure the context for every Web application deployed to this tc Server instance.

  1. Navigate to the tc Server configuration pages.
  2. Click the Configuration tab.
  3. Click the Context Container link in the list on the left.
  4. Make your changes. For reference information about the fields on this page, see tc Server Configuration Reference.
  5. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
  6. To write your changes to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undoing Changes.

For additional detailed information about configuring the context container for tc Server, see The Context Container, part of the general Apache Tomcat documentation.

Configuring JSP Options

SpringSource tc Server implements version 2.1 of the Java Server Pages (JSP) specification. Use this page to configure the behavior of the JSPs that are deployed to tc Server.

  1. Navigate to the tc Server configuration pages.
  2. Click the Configuration tab.
  3. Click the Server Defaults: JSP link in the list on the left.
  4. Make your changes. For information about the fields on this page, see tc Server Configuration Reference.
  5. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
  6. To write your changes to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undoing Changes.

For more information about configuring the behavior of JSPs in tc Server, see Jasper 2 JSP Engine How To, part of Apache Tomcat documentation.

Configuring Static Content Defaults

Use this page to configure the behavior of static content in Web applications that run on tc Server.

  1. Navigate to the tc Server configuration pages.
  2. Click the Configuration tab.
  3. Click the Server Defaults: Static Content link in the list on the left.
  4. Make your changes. For  information about the fields on this page, see tc Server Configuration Reference.
  5. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
  6. To write your changes to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undoing Changes.

For additional detailed information about configuring the behavior of static content in tc Server, see Default Servlet Reference, part of the general Apache Tomcat documentation.

Configuring and Creating JDBC Data Sources

JDBC datasources make it easy for a user to access data in a database server. A datasource defines a pool of JDBC connections which in turn connect to a specific database using a specified URL, username, and so on. Use this page to create and configure configure datasources.

You can create two types of JDBC data sources:

  • Database Connection Pool (DBCP) Datasource- The DBCP Datasource is the standard datasource provided by tc Server that uses the commons-dbcp package. Although this datasource is adequate for simple applications, it is single-threaded which means that in order to be thread-safe, tc Server must lock the entire pool, even during query validation. Thus it is not suitable for highly concurrent environments. Additionally, it can be slow, which in turn can negatively affect the performance of Web applications.
  • Tomcat Datasource - The Tomcat Datasource includes all the functionality of the DBCP datasource, but adds additional features to support highly-concurrent environments and multiple core/cpu systems. The Tomcat datasource typically performs much better than the DBCP datasource. Additional features include:
    • Dynamic implementation of the interfaces, which means that the datasource supports the java.sql and javax.sql interfaces for your runtime environment (as long as your JDBC driver supports it), even when compiled with a lower version of the JDK.
    • Validation intervals so that tc Server doesn't have to validate every single time the application uses the connection, which improves performance.
    • Run-Once query, which is a configurable query that tc Server runs only once when the connection to the database is established. This is very useful to setup session settings that you want to exist during the entire time the connection is established.
    • Ability to configure custom interceptors to enhance the functionality of the datasource. You can use interceptors to gather query stats, cache session states, reconnect the connection upon failures, retry queries, cache query results, and so on. The interceptors are dynamic and not tied to a JDK version of a java.sql/javax.sql interface.
    • Asynchronous connection retrieval - you can queue your request for a connection and receive a Future back.

To create a new JDBC datasource, or edit an existing one:

  1. Navigate to the tc Server configuration pages.
  2. Click the Resources tab.
  3. Click the JDBC Data Sources link in the list on the left.
  4. If you want to edit an existing data source, click its name in the table and make your changes. If you want to create a new one, click the Create a New Tomcat/DBCP Data Source link. For information about the fields on this page, see tc Server JDBC Reference.
  5. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
  6. To write your changes to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undoing Changes.

For more information about configuring JDBC data sources, see JNDI Datasource HOW-TO, part of Apache Tomcat documentation.

Configuring and Creating tc Server Services

A tc Server service represents the combination of one or more connector components that share a single engine component for processing incoming requests. A tc Server can have one or more services configured. The default service is "catalina".

  1. Navigate to the tc Server configuration pages.
  2. Click the Services tab.
  3. If you want to edit an existing service, such as the default "catalina" service, click its name in the table and then configure, or add, the following components of the service:
  4. If you want to create a new service, click the New Service link. For information about the fields on the Create a New Service page, see tc Server Service Reference.
  5. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.

For more information about configuring tc Server services, see The Service Component, part of Apache Tomcat documentation.

Configuring and Creating Connectors

Connectors represent the interface between external clients sending requests to (and receiving responses from) a particular tc Server service. A tc Server instance can have one or more connectors, one for each supported message protocol. The default connector, configured for each tc Server, is the HTTP connector.

Use this page to configure, or create new, connectors for the current tc Server service.

  1. Navigate to the tc Server configuration pages.
  2. Click the Services tab.
  3. In the Services table, click the name of the service for which you want to configure or create a connector.
  4. Click the Connectors link in the list on the left.
  5. If you want to edit an existing connector, click its name in the table and make your changes. If you want to create a new one, click the New AJP Connector or New HTTP(S) Connector link, depending on the type of connector you want to create. For information about the fields on this page, see tc Server Services Reference.
  6. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.

For additional detailed information about configuring tc Server connectors, see Connectors How-To, part of the general Apache Tomcat documentation.

Configuring and Creating Virtual Hosts

A tc Server host represents a virtual host, which is an association of a network name for a server (such as "www.mycompany.com") with the particular computer which hosts tc Server. In order to be effective, this name must be registered in the Domain Name Service (DNS) server that manages your Internet domain.

Use this page to configure, or create new, virtual hosts for the current tc Server service.

  1. Navigate to the tc Server configuration pages.
  2. Click the Services tab.
  3. In the Services table, click the name of the service for which you want to configure or create a virtual host.
  4. Click the Hosts link in the list on the left.
  5. If you want to edit an existing host, click its name in the table and make your changes. If you want to create a new one, click the New Host link. For reference information about the fields on this page, see tc Server Services Reference.
  6. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.

For more information about configuring tc Server hosts, see The Host Container, part of Apache Tomcat documentation.

Configuring tc Server Server Logging

Use this page to configure the logging system for the current engine. Note that you can also configure logging for a host by configuring the specific Host component; see Configuring and Creating Virtual Hosts.

  1. Navigate to the tc Server configuration pages.
  2. Click the Services tab.
  3. In the Services table, click the name of the service for which you want to configure logging.
  4. Click the Logging link in the list on the left.
  5. Make your changes in the table. For information about the fields on this page, see tc Server Services Reference.
  6. Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.

For more information about configuring tc Server logging, see Logging in Tomcat, part of the general Apache Tomcat documentation.

Document generated by Confluence on Apr 20, 2010 15:01