Skip to content

Add "Session attribute serialization" section to the "Distributed session caching" doc #8507

Description

@tngiang73

We would like to add a new section to the Distributed session caching doc (https://openliberty.io/docs/latest/distributed-session-caching.html) to cover the following:

Session attribute serialization

When you use distributed session caching, all objects stored as HTTP session attributes must implement java.io.Serializable, including all objects in their class hierarchy. Liberty can only persist serializable attributes to the distributed cache. Non-serializable attributes are stored only in Liberty's local in-memory cache and are lost if the server stops or fails.

Liberty logs the following warning when a non-serializable attribute is detected:
BackedSession putValueGuts Attribute with name <attributeName> is not Serializable. This may cause a problem on a failover.

If you see this warning, ensure that the class for the named attribute and all classes it references implement java.io.Serializable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions