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.
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.