[jboss-jira] [JBoss JIRA] (DROOLS-2542) KieHelper.getKieContainer() is not thread-safe

Nils Meyer (JIRA) issues at jboss.org
Thu May 10 09:59:00 EDT 2018


Nils Meyer created DROOLS-2542:
----------------------------------

             Summary: 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: Edson Tirelli


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.5.0#75005)


More information about the jboss-jira mailing list