[rules-users] Why StatelessKnowledgeSession Instantiates a New StatefulKnowledgeSession on Each execute()?

2011-01-27 Thread hyjshanghai
According to Section 3.3.7 "StatelessKnowledgeSession" of http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html/ch03.html#d0e1956 the Drools document , "the act of calling execute() is a single-shot method that will internally instantiate a StatefulKnowledgeSession". Why St

Re: [rules-users] Why StatelessKnowledgeSession Instantiates a New StatefulKnowledgeSession on Each execute()?

2011-01-27 Thread Esteban Aliverti
Sessions are cheap to create. The problem of removing all the facts and then insert new ones is that depending on you rules, could be much more expensive than throw the old session and create a new one. And you should also think about globals as well. Removing a Fact is not just taking it off from

Re: [rules-users] Why StatelessKnowledgeSession Instantiates a New StatefulKnowledgeSession on Each execute()?

2011-01-30 Thread yj h
I see. Thank you. For instance, retracting a fact with lots of pending activations associated with this fact could me expensive. Am I right? 2011/1/27 Esteban Aliverti > Sessions are cheap to create. > The problem of removing all the facts and then insert new ones is that > depending on you rule

Re: [rules-users] Why StatelessKnowledgeSession Instantiates a New StatefulKnowledgeSession on Each execute()?

2011-01-30 Thread Wolfgang Laun
Not just activations. The famous Tokens of Rete referring to facts matching this or that pattern constraint are all over this network. -W 2011/1/30 yj h > I see. Thank you. > For instance, retracting a fact with lots of pending activations associated > with this fact could me expensive. Am I rig