[
https://issues.jboss.org/browse/DROOLS-2825?page=com.atlassian.jira.plugi...
]
Mario Fusco resolved DROOLS-2825.
---------------------------------
Resolution: Explained
In your reproducer you're not running drools in STREAM mode. In fact you correctly set
the STREAM mode in the kieBaseModel, but then you totally override that configuration by
doing:
{code:java}
KieBaseConfiguration configBase = ks.newKieBaseConfiguration();
configBase.setProperty("drools.propertySpecific", "ALWAYS");
kbase = kcontainer.newKieBase(kieBaseName, configBase);
{code}
By doing so you are creating a kiebase with a new configuration and then the existing one
defined in the kmodule is ignored. Also note that the other property that you're
setting it's useless because it is the default behaviour in drools 7. If you add
{code:java}
configBase.setProperty("drools.eventProcessingMode", "stream");
{code}
to the new config, or if you simply obtain the kbase with the config defined in the
kmodule (something that I suggest) with
{code:java}
kbase = kcontainer.getKieBase();
{code}
then drools will run in stream mode and the expired events will be correctly evicted from
the working memory as per your expectation.
Drools @Expires is not working with x seconds 7.4.1 Final Drools
version
------------------------------------------------------------------------
Key: DROOLS-2825
URL:
https://issues.jboss.org/browse/DROOLS-2825
Project: Drools
Issue Type: Bug
Affects Versions: 7.4.1.Final
Reporter: Srinivas ev
Assignee: Mario Fusco
Priority: Blocker
Fix For: 7.4.1.Final
Attachments: EvictionTest.zip, heap.PNG
Attached reproducer. Please check once,
I inserted 5 Fact POJO's. It should have deleted after 200s based on declaration in
the rule file.
declare Fact
@role( event )
@expires(200s)
end
Heap dump shows the 5 entries even after I took the heap dump after 10 minutes. Please
let me know regarding this.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)