[jboss-jira] [JBoss JIRA] (DROOLS-2542) KieHelper.getKieContainer() is not thread-safe
Mario Fusco (Jira)
issues at jboss.org
Thu Nov 22 04:18:01 EST 2018
[ https://issues.jboss.org/browse/DROOLS-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco resolved DROOLS-2542.
---------------------------------
Resolution: Won't Fix
KieHelper is mainly an internal helper class, and it is not indented to be thread-safe
> KieHelper.getKieContainer() is not thread-safe
> ----------------------------------------------
>
> Key: DROOLS-2542
> URL: https://issues.jboss.org/browse/DROOLS-2542
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.7.0.Final
> Reporter: Nils Meyer
> Assignee: Mario Fusco
> Priority: Major
>
> Calling org.kie.api.KieServices.newKieContainer(ReleaseId, ClassLoader), in the way it is done in org.kie.internal.utils.KieHelper.getKieContainer() can cause problems in situations where concurrent threads are in action. newKieContainer reads the latest KieModule from the repository that was written by a builder. If multiple builders for different rules are running in parallel, it's not predictable, which rules will be used when creating a new session (see my sample below).
> I'm aware that I can work around this issue by using ReleaseIds, but nevertheless this behavior is cumbersome if you'd like to understand the relation between the KieFileSystem and the KieContainer in org.kie.internal.utils.KieHelper.getKieContainer()
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list