HHH-4441 : fixing out-of-specification custom Serialization (see also JBMAR-67)
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17612 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
99dac200f2
commit
460a7ace1c
|
@ -173,7 +173,7 @@ public final class SessionImpl extends AbstractSessionImpl
|
|||
private transient Session rootSession;
|
||||
private transient Map childSessionsByEntityMode;
|
||||
|
||||
private EntityNameResolver entityNameResolver = new CoordinatingEntityNameResolver();
|
||||
private transient EntityNameResolver entityNameResolver = new CoordinatingEntityNameResolver();
|
||||
|
||||
/**
|
||||
* Constructor used in building "child sessions".
|
||||
|
@ -1918,6 +1918,8 @@ public final class SessionImpl extends AbstractSessionImpl
|
|||
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
|
||||
log.trace( "deserializing session" );
|
||||
|
||||
ois.defaultReadObject();
|
||||
|
||||
entityNameResolver = new CoordinatingEntityNameResolver();
|
||||
|
||||
boolean isRootSession = ois.readBoolean();
|
||||
|
@ -1972,6 +1974,8 @@ public final class SessionImpl extends AbstractSessionImpl
|
|||
|
||||
log.trace( "serializing session" );
|
||||
|
||||
oos.defaultWriteObject();
|
||||
|
||||
oos.writeBoolean( rootSession == null );
|
||||
oos.writeObject( connectionReleaseMode.toString() );
|
||||
oos.writeObject( entityMode.toString() );
|
||||
|
|
Loading…
Reference in New Issue