Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-457

TaskModelProvider's ServiceLoader sync problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.1.0.Beta2
    • 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

            mproctor@redhat.com Mark Proctor
            marianbuenosayres Mariano Nicolas De Maio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: