Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 25. Externalize Sessions
25.1. Externalize HTTP Session from JBoss EAP to JBoss Data Grid Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
You can use Red Hat JBoss Data Grid as an external cache container for application specific data, such as HTTP sessions, in Red Hat JBoss Enterprise Application Platform (JBoss EAP) 6.4 and later. This allows scaling of the data layer independent of the application, and enables different EAP clusters, that may reside in various domains, to access data from the same JBoss Data Grid cluster. Additionally, other applications can interface with the caches presented by Red Hat JBoss Data Grid.
The below procedure applies for both standalone and domain mode of EAP; however, in domain mode each server group requires a unique remote cache configured. While multiple server groups can utilize the same Red Hat JBoss Data Grid cluster the respective remote caches will be unique to the EAP server group.
Note
For each distributable application, an entirely new cache must be created. It can be created in an existing cache container, for example, web.
Procedure 25.1. Externalize HTTP Sessions
- Ensure the remote cache containers are defined in EAP's
infinispansubsystem; in the example below thecacheattribute in theremote-storeelement defines the cache name on the remote JBoss Data Grid server:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Define the location of the remote Red Hat JBoss Data Grid server by adding the networking information to the
socket-binding-group:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Repeat the above steps for each cache-container and each Red Hat JBoss Data Grid server. Each server defined must have a separate
<outbound-socket-binding>element defined. - Add passivation and cache information into the application's
jboss-web.xml. In the following examplewebis the name of the cache container, andjdgis the name of the default cache located in this container. An example file is shown below:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The passivation timeouts above are provided assuming that a typical session is abandoned within 15 minutes and uses the default HTTP session timeout in JBoss EAP of 30 minutes. These values may need to be adjusted based on each application's workload.