JtaIsolationDelegate tries to resume non-existant transaction

Description

On MySQL the identifier generator does its select/update ID_TABLE thing in a separate transaction. The main transaction is suspended and resumed by JtaIsolationDelegate.

This code fails (new suspended persistence context mode in JPA 2.1, without a joined transaction and auto-commit for reading-only):

With Bitronix, TransactionManager#suspend() in this case returns null, which is legal:

http://docs.oracle.com/javaee/1.4/api/javax/transaction/TransactionManager.html#suspend()

Environment

None

Status

Assignee

Unassigned

Reporter

Christian Bauer

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure