-
Bug
-
Resolution: Done
-
Major
-
6.0.0.Final, 6.0.1.Final, 6.1.0.Beta1, 6.1.0.Beta2, 6.1.0.Final
-
None
-
None
This bug was found related to jBPM6 components, but its solution needs to be implemented in the kie-internal project, hence we report it in this project.
When the TaskModelProvider access the factory object, it iterates the service loader directly. Unfortunately, the ServiceLoader class states:
"Instances of this class are not safe for use by multiple concurrent threads." (http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html)
This causes that environments that need to use the TaskModelProvider from different threads with no prior invocation.
I'll add a maven test to reproduce the issue. We have also a solution we'll submit in a pull request