// so we read it, but we don't need it, so just ignore.
AbstractWorkingMemory rsession = (AbstractWorkingMemory) ois.readObject();
// now unmarshall that byte[]
ByteArrayInputStream bais = new ByteArrayInputStream( rsession.bytes );
Marshaller marshaller = MarshallerFactory.newMarshaller(new KnowledgeBaseImpl(this), new ObjectMarshallingStrategy[]{MarshallerFactory.newSerializeMarshallingStrategy()});
Environment environment = EnvironmentFactory.newEnvironment();
KieSession ksession = marshaller.unmarshall( bais,
conf,
environment );
session = (StatefulSession) ((StatefulKnowledgeSessionImpl) ksession).session;
if ( keepReference ) {