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

15.3. Configuring the JBoss Cache instance used for session state replication


The container for a distributable web application makes use of JBoss Cache to provide HTTP session replication services around the cluster. The container integrates with the CacheManager service to obtain a reference to a JBoss Cache instance. For more information, refer to the Distributed Caching with JBoss Cache Chapter in the Administration and Configuration Guide
The name of the JBoss Cache configuration to use is controlled by the cacheName element in the application's jboss-web.xml (see Section 15.1, “Enabling session replication in your application”). In most cases this does not need to be set because the default value of standard-session-cache is appropriate.
The JBoss Cache configurations in the CacheManager service expose a number of options.

Note

For more information, refer to the JBoss Cache chapter in the Administration and Configuration Guide
The standard-session-cache configuration is already optimized for the web session replication use case, and most of the settings should not be altered. Administrators may be interested in altering the following settings:
  • cacheMode
    The default is REPL_ASYNC, which specifies that a session replication message sent to the cluster does not wait for responses from other cluster nodes confirming that the message has been received and processed. The alternative mode, REPL_SYNC, offers a greater degree of confirmation that session state has been received, but reduces performance significantly.

    Note

    For more information about the other available parameters for cacheMode, refer to the Cache Mode section in the Administration and Configuration Guide.
  • enabled property in the buddyReplicationConfig section
    Set to true to enable buddy replication. Default is false.

    Note

    For more information about the other available parameters for cacheMode, refer to the Buddy Replication section in the Administration and Configuration Guide.
  • numBuddies property in the buddyReplicationConfig section
    Set to a value greater than the default (1) to increase the number of backup nodes onto which sessions are replicated. Only relevant if buddy replication is enabled.

    Note

    For more information about the other available parameters for cacheMode, refer to the Buddy Replication section in the Administration and Configuration Guide.
  • buddyPoolName property in the buddyReplicationConfig section
    A way to specify a preferred replication group when buddy replication is enabled. JBoss Cache tries to pick a buddy who shares the same pool name (falling back to other buddies if not available). Only relevant if buddy replication is enabled.

    Note

    For more information about the other available parameters for cacheMode, refer to the Buddy Replication section in the Administration and Configuration Guide.
  • multiplexerStack
    Name of the JGroups protocol stack the cache should use.

    Note

    For more information about the other available parameters for cacheMode, refer to The Channel Factory Service section in the Administration and Configuration Guide.
  • clusterName
    Identifying name JGroups will use for this cache's channel. Only change this if you create a new cache configuration, in which case this property should have a different value from all other cache configurations.
If you wish to use a completely new JBoss Cache configuration rather than editing one of the existing ones, refer to Deployment Via the CacheManager Service section in the Administration and Configuration Guide.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat