Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1076633

Summary: TaskModelProvider is not thread safe
Product: [Retired] JBoss BPMS Platform 6 Reporter: Maciej Swiderski <mswiders>
Component: jBPM CoreAssignee: Maciej Swiderski <mswiders>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Svitak <jsvitak>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.0CC: kverlaen, mbaluch
Target Milestone: ER1   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:50:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Maciej Swiderski 2014-03-14 18:15:54 UTC
Description of problem:
TaskModelProvider is not thread safe while it should be because it uses ServiceLoader which explicitly states in documentation that:
"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 affects environments that need to use the TaskModelProvider from different threads with no prior invocation.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Maciej Swiderski 2014-03-14 18:18:15 UTC
fix already pushed to master

droolsjbpm-knowledge
master:
https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/57bb84c1b976614d864aaa4602f44d3351ecaff9

Comment 4 Maciej Swiderski 2014-03-15 17:10:35 UTC
backported to 6.0.x

droolsjbpm-knowledge
6.0.x:
https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/1b8dcb8b3de490ff929c3f5ca9b613a272eff689

Comment 5 Jiri Svitak 2014-04-22 11:51:47 UTC
Verified in BPMS 6.0.2.ER1.

Concurrency issues are not easily unit testable.