Apache Tomcat Configuration ReferenceThe Engine Container | |
Introduction |
The Engine element represents the entire request
processing machinery associated with a particular Catalina
Service. It receives and processes
all requests from one or more Connectors,
and returns the completed response to the Connector for ultimate
transmission back to the client.
Exactly one Engine element MUST be nested inside
a Service element, following all of the
corresponding Connector elements associated with this Service.
|
Attributes |
Common Attributes |
Engine的所有实现支持下列属性:
Attribute | Description |
---|
backgroundProcessorDelay |
This value represents the delay in seconds between the
invocation of the backgroundProcess method on this engine and
its child containers, including all hosts and contexts.
Child containers will not be invoked if their delay value is not
negative (which would mean they are using their own processing
thread). Setting this to a positive value will cause
a thread to be spawn. After waiting the specified amount of time,
the thread will invoke the backgroundProcess method on this engine
and all its child containers. If not specified, the default value for
this attribute is 10, which represent a 10 seconds delay.
| className |
Java class name of the implementation to use. This class must
implement the org.apache.catalina.Engine interface.
If not specified, the standard value (defined below) will be used.
| defaultHost |
The default host name, which identifies the
Host that will process requests directed
to host names on this server, but which are not configured in
this configuration file. This name MUST match the name
attributes of one of the Host elements
nested immediately inside.
| jvmRoute |
Identifier which must be used in load balancing scenarios to enable
session affinity. The identifier, which must be unique across all
Tomcat 5 servers which participate in the cluster, will be appended to
the generated session identifier, therefore allowing the front end
proxy to always forward a particular session to the same Tomcat 5
instance.
| name |
Logical name of this Engine, used in log and error messages. When
using muliple Service elements in the same
Server, each Engine MUST be assigned a unique
name.
|
|
Standard Implementation |
The standard implementation of Engine is
org.apache.catalina.core.StandardEngine.
It supports the following additional attributes (in addition to the
common attributes listed above):
|
|
Nested Components |
You can nest one or more Host elements inside
this Engine element, each representing a different virtual
host associated with this server. At least one Host
is required, and one of the nested Hosts MUST
have a name that matches the name specified for the
defaultHost attribute, listed above.
You can nest at most one instance of the following utility components
by nesting a corresponding element inside your Engine
element:
- Realm -
Configure a realm that will allow its
database of users, and their associated roles, to be shared across all
Hosts and Contexts
nested inside this Engine, unless overridden by a
Realm configuration at a lower level.
|
Special Features |
Logging |
An engine is associated with the
org.apache.catalina.core.ContainerBase.[enginename]
log category. Note that the brackets are actually part of the name,
don't omit them.
|
|
|