((InternalWorkingMemory) session).setRuleBase( this );
((InternalWorkingMemory) session).setId( ( nextWorkingMemoryCounter() ) );
ExecutorService executor = ExecutorServiceFactory.createExecutorService( this.config.getExecutorService() );;
executor.setCommandExecutor( new CommandExecutor( session ) );
((InternalWorkingMemory) session).setExecutorService( executor );
if ( keepReference ) {
addStatefulSession( session );
for( Iterator it = session.getRuleBaseUpdateListeners().iterator(); it.hasNext(); ) {