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