Bug 1241358

Summary: SingleSessionCommandService Interceptor stack is lost when rollback
Product: [Retired] JBoss BPMS Platform 6 Reporter: Toshiya Kobayashi <tkobayas>
Component: jBPM CoreAssignee: Alessandro Lazarotti <alazarot>
Status: CLOSED EOL QA Contact: Karel Suta <ksuta>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: mbaluch
Target Milestone: ER1   
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1241756 (view as bug list) Environment:
Last Closed: 2020-03-27 20:07:04 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:
Bug Depends On:    
Bug Blocks: 1241756    

Description Toshiya Kobayashi 2015-07-09 06:22:42 UTC
Description of problem:

RuntimeManager adds OptimisticLockRetryInterceptor and TransactionLockInterceptor on top of SingleSessionCommandService$TransactionInterceptor on KieSession initialization.

But once a transaction is rolled back in later process execution, SingleSessionCommandService.commandService is overwritten by new TransactionInterceptor(kContext) in initExistingKnowledgeSession() hence the Interceptor stack is lost.

How reproducible:

Once a process execution transaction is rolled back, always reproducible. It could be serious in case of Singleton strategy because an application keeps using the ksession alive.

Steps to Reproduce:
1. Going to send a pull request.

Comment 1 Toshiya Kobayashi 2015-07-09 07:02:48 UTC
PR test case:
https://github.com/droolsjbpm/jbpm/pull/274

Comment 2 Toshiya Kobayashi 2015-07-09 07:09:01 UTC
PR fix proposal:
https://github.com/droolsjbpm/drools/pull/458

Please review.

Comment 4 Karel Suta 2015-09-01 14:06:54 UTC
Verified in 6.2.0.ER1