tc Server Configuration
From this screen you can configure all aspects of the current tc Server, as well as create new artifacts of the server such as virtual hosts, JDBC data sources, and engines. In particular, you can:
- Configure general tc Server options.
- Configure startup options, such as JVM options, garbage collection, and debugging.
- Configure the context container.
- Configure JSP options.
- Configure static tc Server defaults.
- Configure existing, or create new, JDBC datasources.
- Configure existing, or create new, tc Server services.
- Configure existing, or create new, AJP or HTTP(S) connectors.
- Configure existing, or create new, virtual hosts.
- Configure the tc Server logging subsystem.
You can also delete the following tc Server artifacts by browsing to the appropriate table, as described by the corresponding procedure to create a new one, and clicking the Delete link:
- Services
- JDBC data sources
- Virtual hosts
- Connectors
Navigating the tc Server Configuration Pages
To navigate to the Server Configuration pages of a tc Server instance, follow these steps.
- Click the Resources > Browse link at the top of the AMS Console.
- Click the Servers (X) link to list all the servers in your resource inventory. The tc Server instances of tc Server are listed as "SpringSource tc Server 6.0"; Apache Tomcat servers are listed as "Tomcat X.X".
- In the table, click the name of the tc Server instance to which you want to navigate.
- 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:
- From the Configuration page you can configure general tc Server options that apply to the entire server, such as JVM options, JSP behavior, default options for static content, and so on.
- From the Resources tab you can create new JDBC data sources, as well as configure or delete existing ones.
- From the Services tab you can configure the default catalina service, as well as 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.
The tc Server configuration pages include a question icon ( ) next to many of the fields that you can click to get information about the particular field. |
Saving or Undo-ing Your Changes
AMS populates the fields of the tc Server configuration pages from the configuration files that correspond to the current tc Server instance. These files include conf/server.xml, conf/context.xml, conf/web.xml, and bin/setenv.sh, all relative to CATALINA_BASE, the root directory of the tc Server instance.
Each individual AMS server configuration page includes a Save button for you to save the changes you made in AMS back to the tc Server configuration files. If you try to navigate to a different AMS page without saving any of your updates, AMS asks you if you really want to leave the page and lose these updates.
When you click Save to save your changes, a box labelled "Changes have been made locally" is displayed until you take one of the following actions: click Push to write the configuration changes you have made with AMS to the appropriate tc Server configuration file (such as server.xml) or Undo to undo all changes that have been made since the last push or undo. If you push the changes, AMS overwrites the existing tc Server configuration. Most saved changes to the tc Server configuration require a server startup to take effect; AMS flags these cases and provides a link to easily restart the tc Server.
|
If you use AMS to update the tc Server configuration, be sure you do NOT manually update the tc Server configuration files, such as server.xml, at the same time. This is because AMS clears its local memory and reloads the configuration files at only certain events, not continuously. |
Configuring General tc Server Options
The main tc Server configuration page includes options to change the shutdown port and string.
- Navigate to the tc Server configuration pages.
- Click the Configuration tab.
- Click the General link in the list on the left.
- Make your changes. For reference information about the fields on this page, see tc Server Configuration Reference.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved within AMS.
- To ensure that your changes are actually written to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undo-ing Your Changes .
For additional detailed information about configuring the tc Server, see The Server Component, part of the general Apache Tomcat documentation.
Configuring Startup Options
The page to configure the tc Server startup mainly includes options for configuring the Java virtual machine upon which tc Server runs, such as the minimum and maximum heap size, garbage collection options, and debugging options.
NOTE: AMS populates the tc Server startup configuration page with information contained in the CATALINA_HOME/bin/setenv.sh file of the tc Server instance you are configuring (specifically the JVM_OPTS environment variable.) By default, the setenv.sh file does not exist; rather, you have to explicitly create it. Therefore, if you have not created the file, or if the file exists but you have not set the JVM_OPTS environment variable, then all the fields in the server startup configuration page will be blank.
The page also includes a field where you can add your own command line arguments to the JVM; be careful using this option because AMS 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.
- Navigate to the tc Server configuration pages.
- Click the Configuration tab.
- Click the Server Start link in the list on the left.
- Make your changes. For reference information about the fields on this page, see tc Server Configuration Reference.
- If you want to add your own JVM command line arguments, click the Advanced link at the bottom and enter them in the form the form "-XoptionAndValue or -XX:option=value, each option separated by a space.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
- To ensure that your changes are actually written to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undo-ing Your Changes .
Configuring the Context Container
Use this page to configure the context for every Web application deployed to this tc Server instance.
- Navigate to the tc Server configuration pages.
- Click the Configuration tab.
- Click the Context Container link in the list on the left.
- Make your changes. For reference information about the fields on this page, see tc Server Configuration Reference.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
- To ensure that your changes are actually written to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undo-ing Your 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 the 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.
- Navigate to the tc Server configuration pages.
- Click the Configuration tab.
- Click the Server Defaults: JSP link in the list on the left.
- Make your changes. For reference information about the fields on this page, see tc Server Configuration Reference.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
- To ensure that your changes are actually written to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undo-ing Your Changes .
For additional detailed information about configuring the behavior of JSPs that run in tc Server, see Jasper 2 JSP Engine How To, part of the general 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.
- Navigate to the tc Server configuration pages.
- Click the Configuration tab.
- Click the Server Defaults: Static Content link in the list on the left.
- Make your changes. For reference information about the fields on this page, see tc Server Configuration Reference.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
- To ensure that your changes are actually written to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undo-ing Your 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 configure an existing datasource as well as create a new one.
You can create two types of JDBC data sources:
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 negativelly affect the performance of Web applications.
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, follow these steps:
- Navigate to the tc Server configuration pages.
- Click the Resources tab.
- Click the JDBC Data Sources link in the list on the left.
- 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 reference information about the fields on this page, see tc Server JDBC Reference.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
- To ensure that your changes are actually written to the tc Server configuration files, click Push in the "Changes have been made locally" box. See Saving or Undo-ing Your Changes .
For additional detailed information about configuring JDBC data sources, see JNDI Datasource HOW-TO, part of the general 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 called "catalina".
- Navigate to the tc Server configuration pages.
- Click the Services tab.
- 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:
- If you want to create a new service, click the New Service link. For reference information about the fields on the Create a New Service page, see tc Server Service Reference.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
For additional detailed information about configuring tc Server services, see The Service Component, part of the general 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.
- Navigate to the tc Server configuration pages.
- Click the Services tab.
- In the Services table, click the name of the service for which you want to configure or create a connector.
- Click the Connectors link in the list on the left.
- 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 reference information about the fields on this page, see tc Server Services Reference.
- 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.
- Navigate to the tc Server configuration pages.
- Click the Services tab.
- In the Services table, click the name of the service for which you want to configure or create a virtual host.
- Click the Hosts link in the list on the left.
- 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.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
For additional detailed information about configuring tc Server hosts, see The Host Container, part of the general 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.
- Navigate to the tc Server configuration pages.
- Click the Services tab.
- In the Services table, click the name of the service for which you want to configure logging.
- Click the Logging link in the list on the left.
- Make your changes in the table. For reference information about the fields on this page, see tc Server Services Reference.
- Click Save. The message "Configuration saved successfully" indicates your changes were successfully saved.
For additional detailed information about configuring tc Server logging, see Logging in Tomcat, part of the general Apache Tomcat documentation.
|