JtaTransactionInterceptor should not rollback existing JTA transactions but use setRollbackOnly instead

Description

The org.activiti.engine.impl.interceptor.JtaTransactionInterceptor uses wrong rollback policy for existing JTA transactions.

It should call TransactionManager.rollback() only for transactions that it started itself. For existing transactions it should call TransactionManager.setRollbackOnly().

In other words, I think that the lines A and B should be swapped in the following code fragment from JtaTransactionInterceptor:

JtaTransactionInterceptor.java

Environment

None

Assignee

Daniel Meyer (camunda)

Reporter

Vlastimil Mencik

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure