Bug 999854 - Missing getKieBase() method in StatelessKieSession interface
Missing getKieBase() method in StatelessKieSession interface
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ER3
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
Depends On:
  Show dependency treegraph
Reported: 2013-08-22 05:30 EDT by Marek Winkler
Modified: 2014-08-06 16:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:18:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marek Winkler 2013-08-22 05:30:40 EDT
Description of problem:

When using StatelessKieSession constructed from KieContainer.newStatelessKieSession(), it is not possible to instantiate DRL declared facts in Java (or use other operations which require access to KieBase).

To be able to do this, you need to use methods from the same KieBase, which was used to construct the StatelessKieSession. In case of (stateful) KieSession, there is a method KieSession.getKieBase() which provides you access to such KieBase. However, in case of StatelessKieSession, no such method is available.

When using StatelessKieSession injection through CDI, this problem might require solution such as injecting KieBase instead of a StatelessKieSession and calling kieBase.newStatelessKieSession() to create the KieBase.

Version-Release number of selected component (if applicable):

Drools 6.0.0-SNAPSHOT
Drools 6.0.0.CR1

We have discussed with etirelli that adding a new method in the public API would be possible even at this time.
Comment 1 Mario Fusco 2013-08-22 06:49:16 EDT
I added the getKieBase() method to the StatelessKieSession interface.
Comment 2 Marek Winkler 2013-09-24 11:36:35 EDT
Verified on BRMS 6.0.0.ER3.

Note You need to log in before you can comment on or make changes to this bug.