Details
-
Bug
-
Resolution: Done
-
Minor
-
None
-
None
-
None
Description
I wrote a FailureDetectingSystemEventListener to retain the exceptions throw in the scanner, so I can fail my testcase if there are any exception is the off-threads of a testcase that should fail the test case (but currently don't).
FailureDetectingSystemEventListener systemEventListener = new FailureDetectingSystemEventListener();
SystemEventListenerFactory.setSystemEventListener(systemEventListener);
However, when I tried registering this on the agent:
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("csv agent");
kagent.setSystemEventListener(systemEventListener);
It didn't work, the DoNothingSEL was still used.
When I tried on the SystemEventListenerFactory:
SystemEventListenerFactory.setSystemEventListener(systemEventListener);
a StackOverflowException occurs, because ProcessChangeSet.listener is a DelegatingSEL pointing to itself.