| Summary: | Methods called on disposed knowledge session should throw an exception | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Tomas Schlosser <tschloss> |
| Component: | BRE (Expert, Fusion) | Assignee: | Nobody <nobody> |
| Status: | VERIFIED --- | QA Contact: | Lukáš Petrovický <lpetrovi> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.1.0 GA, BRMS 5.2.0-ER1 | CC: | atangrin, mproctor |
| Target Milestone: | --- | ||
| Target Release: | BRMS 5.3.0.GA | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
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.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 734762 | ||
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.
|
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");