| Summary: | working memory event listener not registered from Spring configuration | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Radovan Synek <rsynek> | ||||
| Component: | BRE (Expert, Fusion) | Assignee: | Nobody <nobody> | ||||
| Status: | VERIFIED --- | QA Contact: | Radovan Synek <rsynek> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | BRMS 5.3.0.GA | CC: | rzhang | ||||
| Target Milestone: | --- | ||||||
| Target Release: | BRMS 5.3.0.GA | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | Type: | --- | |||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
On first sight, looks like KnowledgeSessionDefinitionParser is forgetting to call AbstractKnowledgeSessionBeanFactory.setWorkingMemoryEventListeners(...) The problem is that the wrong DebugWorkingMemoryEventListener has been used.
Instead of:
<bean id="debugWorkingMemoryEventListener" class="org.drools.event.DebugWorkingMemoryEventListener" />
it should be:
<bean id="debugWorkingMemoryEventListener" class="org.drools.event.rule.DebugWorkingMemoryEventListener" />
I 'll adjust the code so it fails-fast when such wrong configuration happens.
|
Created attachment 542456 [details] maven web app I have folowing Spring configuration (showing only relevant part): <bean id="debug-wm-listener" class="org.drools.event.DebugWorkingMemoryEventListener" /> <drools:ksession id="statefulSession" type="stateful" kbase="kbase1"> <drools:workingMemoryEventListener ref="debug-wm-listener"/> </drools:ksession> Configured WM Event listener in knowledge stateful session by Spring. Expecting (at least) one WM Event listener: statefulSession.getWorkingMemoryEventListeners().size() but size is 0. See attachment: build as maven project, then deploy to tomcat, open webapp in browser and click on the second link.