[jboss-jira] [JBoss JIRA] (JBRULES-3287) Registering a SystemEventListener for a change set scanner does not seem to work. Therefor it's not possible to detect exceptions during scanning.

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Mon Jan 16 16:56:19 EST 2012


     [ https://issues.jboss.org/browse/JBRULES-3287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edson Tirelli resolved JBRULES-3287.
------------------------------------

         Assignee: Edson Tirelli  (was: Mark Proctor)
    Fix Version/s: 5.4.0.Beta2
       Resolution: Done


Geoffrey, I am trying to get my head around this ticket and all the related ones. I applied your test case and after removing a couple lines from the test that I think were wrong, the test no longer fails. I added the test to both master and 5.3.x branches anyway and I am closing this ticket. Please let me know if you think there is still a problem here.
                
> Registering a SystemEventListener for a change set scanner does not seem to work. Therefor it's not possible to detect exceptions during scanning.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-3287
>                 URL: https://issues.jboss.org/browse/JBRULES-3287
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Geoffrey De Smet
>            Assignee: Edson Tirelli
>            Priority: Minor
>             Fix For: 5.4.0.Beta2
>
>         Attachments: JBRULES-3287.patch
>
>
> 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).
> {code}
>         FailureDetectingSystemEventListener systemEventListener = new FailureDetectingSystemEventListener();
>         SystemEventListenerFactory.setSystemEventListener(systemEventListener);
> {code}
> However, when I tried registering this on the agent:
> {code}
>             KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("csv agent");
>             kagent.setSystemEventListener(systemEventListener);
> {code}
> It didn't work, the DoNothingSEL was still used.
> When I tried on the SystemEventListenerFactory:
> {code}
>         SystemEventListenerFactory.setSystemEventListener(systemEventListener);
> {code}
> a StackOverflowException occurs, because ProcessChangeSet.listener is a DelegatingSEL pointing to itself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list