JdbcResourceLocalTransactionCoordinatorImpl#markRollbackOnly should be ignored if there is no TX

Description

[1] shows the call stack of how JdbcResourceLocalTransactionCoordinatorImpl#markRollbackOnly can be called without an TX but still sets rollbackOnly to true. We should ignore this call if there is no TX.

Change markRolbackOnly to also check if tx status is NOT_ACTIVE. Currently, we are checking getStatus() != TransactionStatus.ROLLED_BACK which is not enough, as we shouldn't set the rollbackOnly flag if tx status is NOT_ACTIVE.

[1] https://paste.fedoraproject.org/paste/t6V1x7tXZMx1mX4RLmG3wg

Environment

None

Status

Assignee

Steve Ebersole

Reporter

Scott Marlow

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.3.0.Final

Priority

Major
Configure