StatefulKnowledgeSession ksession,
KnowledgeSessionConfiguration config) {
try {
Marshaller marshaller = MarshallerFactory.newMarshaller( knowledgeBase );
ByteArrayOutputStream o = new ByteArrayOutputStream();
marshaller.marshall( o, ksession );
ksession = marshaller.unmarshall( new ByteArrayInputStream( o.toByteArray() ), config, KnowledgeBaseFactory.newEnvironment() );
ksession.fireAllRules();
//scheduler = ksession.<SessionClock>getSessionClock();
} catch ( Exception e ) {
throw new RuntimeException( e );