My Oracle Support Banner

When is In-Memory Session Data Replicated on Oracle GlassFish Server v3.1.1 (Doc ID 1354459.1)

Last updated on APRIL 18, 2023

Applies to:

Oracle GlassFish Server - Version 3.1.1 and later
Information in this document applies to any platform.


In GlassFish 3.1.x, a web application can be configured to use distributed sessions with replicated persistence type, and deployed with --availabilityenabled=true. After this is done the session is replicated between two instances (Ref: GlassFish 3.1 Development Guide) provided Group Management Service (GMS) and network multicast work between the instances.

Observe the following scenario:

  1. Let say there are two nodes in a GlassFish cluster, n1 and n2.
  2. The web application is using replicated persistence type and deployed with --availabilityenabled. It is tested that replication works.
  3. A web session s1 is created in n1 by accessing the web application at n1
  4. It is observed that the session is replicated to n2. This can be seen by enabling logger "org.shoal.ha.cache.command.level=FINE"
  5. Next, shutdown n1.
  6. Now send a another request with session s1, it should land on n2. (due to the load balancer)
  7. The web session s1 is found on n2.
  8. Start node n1 and wait for it to start up completely and wait for 2 minutes before going to step 9.
  9. Shutdown node n2 and wait for it to completely shut down.
  10. Throughout step 6-9, no new HTTP request is issued
  11. Now send a HTTP request with web session s1
  12. Web session s1 is lost in node n1. A new web session is created.

The thing to observe is that web session s1 is lost.




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.