// now unmarshall that byte[]
ByteArrayInputStream bais = new ByteArrayInputStream( rsession.bytes );
Marshaller marshaller = MarshallerFactory.newMarshaller( new KnowledgeBaseImpl( this ) );
StatefulKnowledgeSession ksession = marshaller.unmarshall( bais,
new SessionConfiguration(),
EnvironmentFactory.newEnvironment() );
session = (StatefulSession) ((StatefulKnowledgeSessionImpl) ksession).session;
if ( keepReference ) {
super.addStatefulSession( session );