Hide Forgot
Description of problem: When you try to run a simple code (see the end of description) where you insert facts into disposed stateful knowledge session you get no exception warning you that you are using disposed session. However it works (fact is inserted, rules fire) the bug is that it doesn't work with named entry points. If you try inserting event into entry point you get NullPointerException: java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1956) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:816) at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:299) at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:478) at org.drools.time.impl.JDKTimerService.schedule(JDKTimerService.java:114) at org.drools.time.impl.JDKTimerService.scheduleJob(JDKTimerService.java:80) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:205) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:145) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:176) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:145) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:96) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:44) at org.jboss.qa.drools.features.cep.EventLifecycleTest.testManagedLifecycle(EventLifecycleTest.java:130) Additional info: StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession(); session.insert("hello world"); session.fireAllRules(); session.dispose(); session.insert("goodbye world"); session.fireAllRules(); ksession.getWorkingMemoryEntryPoint("EventStream").insert("this one throws NPE");
Border line enhancment request.
We'll generate a proxy that throws exceptions when used.
This was fixed at the same time as https://bugzilla.redhat.com/show_bug.cgi?id=734762
It is fixed now. Thank you
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: An error occurred where inserting facts into a disposed stateful knowledge session should result in an exception being thrown, however, no exception was thrown. This has been resolved and the illegalStateException is now thrown when inserting facts into a disposed stateful knowledge session.