public StatefulKnowledgeSession newStatefulKnowledgeSession() {
return newStatefulKnowledgeSession(new SessionConfiguration());
}
public StatefulKnowledgeSession newStatefulKnowledgeSession(KnowledgeSessionConfiguration conf) {
CommandService commandService = ((SessionConfiguration) conf).getCommandService(this.ruleBase);
if (commandService != null) {
return new CommandBasedStatefulKnowledgeSession(commandService);
} else {
ReteooStatefulSession session = (ReteooStatefulSession) this.ruleBase.newStatefulSession( (SessionConfiguration) conf );
return new StatefulKnowledgeSessionImpl( session, this );