此内容没有您所选择的语言版本。

4.6. Containers


Containers represent components, which process incoming requests (<Engine>, <Host>, and <Context>).

4.6.1. Engine

The Engine represents the entity that processes the requests received by the parent Service; that is, the engine accepts requests from all Connectors defined for the Service, processes them, and returns them to the appropriate Connector.
To define the virtual host of the server that the engine can use, nest multiple Host elements inside the Engine element; each Host element represents one virtual host. You need to define at least one Host element and one of the Hosts must have a name that matches the defaultHost value defined in the parent Engine element.
The Engine element can contain at most one Realm element. The Realm element represents a database of users and their roles: the user information defined in the respective resource is shared across all Hosts and Contexts nested inside the Engine. Realm setting in the Engine element can be overridden by another Realm element defined in a lower-level element; that is, a Host or Context element.
Expand
Table 4.5. Engine Element Attributes
Attribute Description
backgroundProcessorDelay
delay between the invocation of the backgroundProcess method on the engine and the invocation of the backgroundProcess method on the child containers of the Engine (Engine's Hosts and Contexts; 10 by default, that is 10 seconds)
If set to a positive value, the engine produces a thread. The thread waits for the specified amount of time and then invokes the backgroundProcess method on the engine and all its child containers.
Host and Context containers can also define the backgroundProcessorDelay attribute. If the delay of a child container is not negative, the child container is using its own processing thread.
className
class implementing the Engine
The class must implement the org.apache.catalina.Engine interface. If not specified, the standard value org.apache.catalina.core.StandardEngine is used.
defaultHost
name of the default host name
The default Host processes requests directed to host names on the server that are not configured in the server.xml configuration file. The defaultHost must match the name attribute of a Host element nested immediately inside the Engine element.
jvmRoute
identifier used in load balancing scenarios to enable session affinity (so-called "sticky sessions")
The identifier must be unique across all JBoss Web servers which participate in the cluster. It is appended to the generated session identifier so that a front-end proxy can always forward a particular session to the same JBoss Web instance.
name
logical name of the Engine used in log and error messages
When using multiple Service elements in the same Server, each Engine must be assigned a unique name.

Note

Make sure the Engine element is located after all its connectors as connectors defined after the Engine element are ignored.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat