Permalink
Browse files

Only SingleSessionCommandService turns off process instance

serialization as part of the session
  • Loading branch information...
1 parent 1315268 commit 5abb20d1125f13c7f63191e5e46fb064752a879c krisv committed Sep 20, 2011
@@ -142,5 +142,9 @@ public void marshall(final OutputStream stream,
OutputMarshaller.writeSession( context );
context.close();
}
+
+ public MarshallingConfiguration getMarshallingConfiguration() {
+ return marshallingConfig;
+ }
}
@@ -51,7 +51,7 @@ public Marshaller newMarshaller(KnowledgeBase kbase) {
}
public Marshaller newMarshaller(KnowledgeBase kbase, ObjectMarshallingStrategy[] strategies) {
- return new DefaultMarshaller( kbase , new MarshallingConfigurationImpl( strategies, false, false ) );
+ return new DefaultMarshaller( kbase , new MarshallingConfigurationImpl( strategies, true, true ) );
}
}
@@ -111,6 +111,10 @@ public KnowledgeBase getKbase() {
public KnowledgeSessionConfiguration getConf() {
return conf;
}
+
+ public Marshaller getMarshaller() {
+ return marshaller;
+ }
}
@@ -36,18 +36,17 @@
import org.drools.common.EndOperationListener;
import org.drools.common.InternalKnowledgeRuntime;
import org.drools.impl.KnowledgeBaseImpl;
+import org.drools.marshalling.impl.DefaultMarshaller;
+import org.drools.marshalling.impl.MarshallingConfigurationImpl;
import org.drools.persistence.info.SessionInfo;
-import org.drools.persistence.jpa.JpaJDKTimerService;
import org.drools.persistence.jpa.JpaPersistenceContextManager;
-import org.drools.persistence.jpa.JpaTimeJobFactoryManager;
import org.drools.persistence.jpa.processinstance.JPAWorkItemManager;
import org.drools.persistence.jta.JtaTransactionManager;
import org.drools.runtime.Environment;
import org.drools.runtime.EnvironmentName;
import org.drools.runtime.KnowledgeSessionConfiguration;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.process.InternalProcessRuntime;
-import org.drools.runtime.process.ProcessRuntime;
import org.drools.time.AcceptsTimerJobFactoryManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -131,6 +130,11 @@ public SingleSessionCommandService(KnowledgeBase kbase,
this.marshallingHelper = new SessionMarshallingHelper( this.ksession,
conf );
+ MarshallingConfigurationImpl config = (MarshallingConfigurationImpl)
+ ((DefaultMarshaller) this.marshallingHelper.getMarshaller()).getMarshallingConfiguration();
+ config.setMarshallProcessInstances(false);
+ config.setMarshallWorkItems(false);
+
this.sessionInfo.setJPASessionMashallingHelper( this.marshallingHelper );
((InternalKnowledgeRuntime) this.ksession).setEndOperationListener( new EndOperationListenerImpl( this.sessionInfo ) );
@@ -213,6 +217,10 @@ public void initKsession(Integer sessionId,
this.marshallingHelper = new SessionMarshallingHelper( kbase,
conf,
env );
+ MarshallingConfigurationImpl config = (MarshallingConfigurationImpl)
+ ((DefaultMarshaller) this.marshallingHelper.getMarshaller()).getMarshallingConfiguration();
+ config.setMarshallProcessInstances(false);
+ config.setMarshallWorkItems(false);
}
this.sessionInfo.setJPASessionMashallingHelper( this.marshallingHelper );

0 comments on commit 5abb20d

Please sign in to comment.