Deleted facts are still retained by ksession after ksession.delete() in BRMS
Issue
- My application uses a stateful ksession for long-time without disposing. It inserts facts, fireAllrules and deletes the facts. Then I observe that deleted facts are retained by the ksession and not garbage collected even after ksession.delete(). So the heap keeps increasing. I understand that ksession.dispose() frees all facts. But does ksession.delete() free the fact as well? My rules are like this:
rule "rule1"
when
$a : FactA()
$b : FactB()
$c : FactC(name == "Paul")
then
System.out.println("rule1");
end
rule "rule2"
when
$a : FactA()
$b : FactB()
$c : FactC(name == "John")
then
System.out.println("rule2");
end
Environment
- Red Hat JBoss BRMS
- 6.0.1
- 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.