Bug 833435 - TasksAdminImpl commits trnx even if it's not owner
TasksAdminImpl commits trnx even if it's not owner
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Mauricio Salatino
Radovan Synek
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-19 09:08 EDT by Jeffrey Bride
Modified: 2016-09-20 01:07 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-03 07:53:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeffrey Bride 2012-06-19 09:08:33 EDT
hi,
  in regards to org.jbpm.task.admin.TasksAdminImpl.archiveTasks() .... seems that line 86 should set:  
  boolean txOwner = tpm.beginTransaction();

and then in line 95:  
   tpm.endTransaction(txOwner);

 otherwise, with the current code,  the JTA trnx is always commited at this point even if this piece of code did not start the trnx

same goes for, TasksAdminImpl.removeTasks()
Comment 2 Marco Rietveld 2012-07-02 04:46:39 EDT
I saw this as well, but thought that maybe Mauricio had a specific reason for writing it this way, given that all other code is written the way Jeffrey mentions. 

Assigning to Mauricio so he can explain.
Comment 3 Mauricio Salatino 2012-07-02 06:48:21 EDT
Jeff you are correct. I will fix that in master. Thanks for pointing that out. After writing the TaskEventsAdmin class which is similar, I've added a TODO to fix that, so I will do that today.

Cheers
Comment 4 Mauricio Salatino 2012-07-03 07:53:07 EDT
It's already fixed in master
Comment 6 Mauricio Salatino 2012-08-24 02:56:04 EDT
Fixed in 5.2.x
Comment 7 Radovan Synek 2012-10-01 03:45:04 EDT
Verified on 5.3.1.BRMS-ER1

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