이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 17. Externalizing HTTP sessions from Red Hat JBoss Web Server to Red Hat Data Grid


Achieve high availability by externalizing HTTP session data from JBoss Web Server deployments to Data Grid Server clusters through the org.apache.catalina.Manager interface.

17.1. Installing the Tomcat session client

Install the Tomcat session client to externalize HTTP sessions from Red Hat JBoss Web Server applications to Red Hat Data Grid.

Procedure

  1. Download the redhat-datagrid-8.1.1-tomcat<$version>-session-client.zip archive from the Data Grid Software Downloads.
  2. Extract the archive to your filesystem.
  3. Copy the contents of the lib/ directory from the extracted archive into $CATALINA_HOME/lib.

17.2. Configuring the session manager

Configure the HotRodManager class for the session manager to define how the Tomcat session client connects to Red Hat Data Grid Server and stores data in remote caches.

Prerequisites

  • Install the Tomcat session client.
  • Install at least one Data Grid Server instance.
  • Create a cache on Data Grid Server to use as a template for storing HTTP session data.

Procedure

  1. Open either $CATALINA_HOME/conf/context.xml or /WEB-INF/context.xml for editing.
  2. Specify org.wildfly.clustering.tomcat.hotrod.HotRodManager as the value for the className property.
  3. Specify the name of the cache to use as a template with the configurationName property.
  4. Define any other configuration properties for the HotRodManager class as appropriate.
  5. Set Hot Rod client configuration properties without the infinispan.client.hotrod. prefix.

    1. Specify the list of Data Grid Server nodes with the server_list property.
    2. Specify Data Grid credentials with the auth_username and auth_password properties.
  6. Specify common attributes for the Tomcat session manager as required.
  7. Save and close context.xml.

Configuration example

<Manager className="org.wildfly.clustering.tomcat.hotrod.HotRodManager"
         configurationName="mycache"
         persistenceStrategy="FINE"
         maxActiveSessions="100"
         server_list="192.0.2.0:11222;192.0.2.0:11223;192.0.2.0:11224"
         protocol_version="2.9"
         auth_username="admin"
         auth_password="changeme"
         auth_realm="default"
         sasl_mechanism="DIGEST-MD5"
         auth_server_name="infinispan"/>

Verification

To verify that the Tomcat session client stores data in remote caches, do the following:

  1. Open the Data Grid Console in any browser.

    By default the console is available at http://127.0.0.1:11222/console/.

  2. Check that the Tomcat session client has created caches for each deployed application.

17.2.1. Hot Rod manager configuration properties

The following table lists and describes configuration properties for the HotRodManager class:

PropertyDescription

className

Specifies org.wildfly.clustering.tomcat.hotrod.HotRodManager as the session manager.

configurationName

Specifies a remote cache on Data Grid Server to use as a template for storing HTTP session data.

persistenceStrategy

Defines how sessions map to entries in the cache.

COARSE stores all attributes of a session in a single cache entry. This is the default.

FINE stores session attributes in separate cache entries.

maxActiveSessions

Defines the maximum number of sessions to store in the cache. The default is no maximum (limitless).

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.