Skip to content

Stateless session is not serializable #1553

Open
@fredericDelaporte

Description

@fredericDelaporte

Stateless session is not serializable, although flagged as such: at least, it cannot be deserialized.

  • It is not restoring its connection manager, which can only lead to null reference exceptions. (May change with NH-3606 - open a stateless session from a session #1520.)
  • It is not restoring its temporaryPersistenceContext, which will also lead to null reference exceptions.
  • It has no suitable constructor for allowing deserialization. (Binary serialization does not call any in its basic pattern, so this is not an issue.)
  • It should check some preconditions before serializing, as do SessionImpl.

But well, what is the point of serializing a stateless session? Better close and open a new one I think. So set as trivial.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions