Aller au contenu principal
Jahia Store
FR

Distributed Sessions

supported
Télécharger 4.2.0

Informations

Identifiant du module
distributed-sessions
Identifiant de groupe
org.jahia.modules
Statut
supported
Catégorie
Platform
Auteur
JSG
Site web du développeur
http://www.jahia.com
Nécessite Jahia
8.1.5.0
Mis à jour
2026-07-09
Source
scm:git:git@github.com:Jahia/distributed-sessions.git

For authenticated users, the Jahia stores data in the HTTP session. By default, this data is stored in the memory of the server, where requests of a session are routed to. When the server is shut down, all this session data disappears and the user will have to login again and eventually re-do steps. For higher availability and up-time we recommend replicating the session data on all servers, so that sessions survive a stopped server and that other servers can continue working on user requests, which were previously served from the stopped server. 

Starting with v2.0.0, the distributed-sessions module offers the ability to distribute sessions on all servers with hazelcast.

The Jahia Academy contains dedicated documentation detailing distributed session usage for Jahia 8 and for Jahia 7. Please make sure to review this document prior to deploying the distributed-session module.

Captures d'écran

Versions

Improvements

  • Implemented a session eviction mechanism when maxUsedHeapPercentage goes over a configured threshold (20% by default, modifiable via configuration)

Bug fixes

  • Removed distributed-sessions Server-Availability-Manager probe (added in v4.1.0) as it was causing stability issues.
  • Fixed an issue when redploying a module registering a custom object in distributed sessions. 

Please note that after registering a complex object from a custom module, uninstalling that module or stopping + refreshing wiring of the module will break existing user sessions. This can be addressed by restarting distributed-session, please see the note on that subject in the academy. A dedicated log message was added to Jahia logs when this issue is detected.

Note about Jahia 8.2

When installing distributed session on a Jahia 8.2 installed by a method different than the Installer or the Docker image, you might encounter the following error: "Not Supported: http://javax.xml.XMLConstants/property/accessExternalDTD"

This can be addressed by adding the following to CATALINA_OPTS:

CATALINA_OPTS: -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
Nécessite Jahia 8.1.5.0Mis à jour 2024-11-12
4.1.0brouillonTélécharger

Bug fixes

  • Fixed an issue when redploying a module registering a custom object in distributed sessions. 
  • Added a new Server Availability Manager (SAM) probe for distributed-sessions.

Please note that after registering a complex object from a custom module, uninstalling that module or stopping + refreshing wiring of the module will break existing user sessions. This can be addressed by restarting distributed-session, please see the note on that subject in the academy.

Note about Jahia 8.2

When installing distributed session on a Jahia 8.2 installed by a method different than the Installer or the Docker image, you might encounter the following error: "Not Supported: http://javax.xml.XMLConstants/property/accessExternalDTD"

This can be addressed by adding the following to CATALINA_OPTS:

CATALINA_OPTS: -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
Nécessite Jahia 8.1.5.0Mis à jour 2024-11-12

Improvements

  • Migrate distributed-sessions internal implementation from Spring to full OSGI. This change is expected to improve stability of the module.

Breaking Changes

No breaking changes impacting our customers’ codebase are present.

The version of distributed sessions was bumped to the next major version due to the nature of the change being made (migration from Spring to OSGI).

Note about Jahia 8.2

When installing distributed session on a Jahia 8.2 installed by a method different than the Installer or the Docker image, you might encounter the following error: "Not Supported: http://javax.xml.XMLConstants/property/accessExternalDTD"

This can be addressed by adding the following to CATALINA_OPTS:

CATALINA_OPTS: -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
Nécessite Jahia 8.1.5.0Mis à jour 2024-10-14

Improvements

  • Updated the module for compatibility with Jahia 8.2.0.1

Misc

  • Updated Jahia parent version to 8.1.5.0
Note about Jahia 8.2

When installing distributed session on a Jahia 8.2 installed by a method different than the Installer or the Docker image, you might encounter the following error: "Not Supported: http://javax.xml.XMLConstants/property/accessExternalDTD"

This can be addressed by adding the following to CATALINA_OPTS:

CATALINA_OPTS: -Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
Nécessite Jahia 8.1.5.0Mis à jour 2024-06-18
Note about version 3.4.1

Distributed Sessions 3.4.1 does not depend to jahia-csrf-guard 3.2.0 anymore. So you may need to upgrade also jahia-csrf-guard. Both modules updates will require the restart of the cluster nodes. More details here.

Bugfixes

  • Fixed an issue with import packages causing issues with Jahia 8.1.3.0
Nécessite Jahia 8.1.0.0Mis à jour 2024-06-27
Note about version 3.4.0

Distributed Sessions 3.4.0 does not depend to jahia-csrf-guard 3.2.0 anymore. So you may need to upgrade also jahia-csrf-guard. Both modules updates will require the restart of the cluster nodes. More details here.

Improvements

  • Removed dependency to jahia-csrf-guard
Nécessite Jahia 8.1.0.0Mis à jour 2024-05-21
Note about version 3.3.0

Distributed Sessions 3.3.0 has a hard dependency to jahia-csrf-guard 3.0.0 . So you may need to upgrade also jahia-csrf-guard. Both modules updates will require the restart of the cluster nodes. More details here.

Bug fixes

  • Added full support for CSRF guard token accross the cluster
Nécessite Jahia 8.1.0.0Mis à jour 2022-11-16

Improvements and bug fixes

  • Improved performances by allowing hazelcast instance to be restarted, stopping all threads and freeing the memory
  • Improved the sessions store/restore actions
  • Improved the handling of the sticky session server affinity
  • Updated the default cookie name provided by Jahia to DISTRIBUTED_JSESSIONID
  • Added checks on hazelcast status to prevent errors
  • Added GraphQL endpoint to get information about the sessions (admin.distributedSessions)

As always, please refer to the schema (accessible via GraphQL Playground) for the API documentation.

Nécessite Jahia 8.1.0.0Mis à jour 2022-06-13
3.2.0brouillonTélécharger

Improvements and bug fixes

  • Improved performances by allowing hazelcast instance to be restarted, stopping all threads and freeing the memory
  • Improved the sessions store/restore actions
  • Improved the handling of the sticky session server affinity
  • Updated the default cookie name provided by Jahia to DISTRIBUTED_JSESSIONID
  • Added checks on hazelcast status to prevent errors
  • Added GraphQL endpoint to get information about the sessions (admin.distributedSessions)

As always, please refer to the schema (accessible via GraphQL Playground) for the API documentation.

Nécessite Jahia 8.1.0.0Mis à jour 2021-11-25

Improvements and bug fixes

  • Improved performances by allowing hazelcast instance to be restarted, stopping all threads and freeing the memory
  • Improved the sessions store/restore actions
  • Improved the handling of the sticky session server affinity
  • Updated the default cookie name provided by Jahia to DISTRIBUTED_JSESSIONID
  • Added checks on hazelcast status to prevent errors
Nécessite Jahia 8.0.0.0Mis à jour 2022-06-13
  • Improve reliability of distributed-sessions in Jahia8
  • Addressed an issue with session expiry
Nécessite Jahia 8.0.0.0Mis à jour 2020-09-04
  • New release compatible with Jahia 8
Nécessite Jahia 8.0.0.0Mis à jour 2020-05-18
  • Improved performances by allowing hazelcast instance to be restarted, stopping all threads and freeing the memory
  • Improved the sessions store/restore actions
  • Improved the handling of the sticky session server affinity
  • Added checks on hazelcast status to prevent errors
Nécessite Jahia 7.3.3.0Mis à jour 2022-06-13
  • Improve reliability of distributed-sessions in Jahia 7
  • Addressed an issue with session expiry
Nécessite Jahia 7.3.3.0Mis à jour 2021-01-21
  • Use JSESSIONID as default cookie name
  • Fixed issue in the configuration file format
Nécessite Jahia 7.3.3.0Mis à jour 2020-01-13
  • Support of distributed sessions using hazelcast
Nécessite Jahia 7.3.3.0Mis à jour 2020-01-13
Nécessite Jahia 7.1.2.0Mis à jour 2017-06-02