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.
PR test case: https://github.com/droolsjbpm/jbpm/pull/274
PR fix proposal: https://github.com/droolsjbpm/drools/pull/458 Please review.
fixed and test case included drools master: https://github.com/droolsjbpm/drools/commit/7ffc62aa554f5884064b81ee80078e35e3833006 jbpm master: https://github.com/droolsjbpm/jbpm/commit/224453fd1217b85d29dd5f134d77e4e7b5ab87ca
Verified in 6.2.0.ER1