droolsjbpm/droolsjbpm-knowledge — pull request #63 by marianbuenosayres2 (2014-03-14 12:13:58+00:00)
Title: Bugfix: TaskModelProvider's ServiceLoader sync problem

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. This patch solves the issue