Bug 1076633 - TaskModelProvider is not thread safe
Summary: TaskModelProvider is not thread safe
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER1
: 6.0.2
Assignee: Maciej Swiderski
QA Contact: Jiri Svitak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-14 18:15 UTC by Maciej Swiderski
Modified: 2015-06-02 01:36 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 19:50:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.