Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jta-dev] Question on registerInterposedSynchronization() when marked for rollback


I already tried asking this on the JTA forum
(, but did not
get a response.

Most methods of TransactionSynchronizationRegistry throw an
IllegalStateException "if no transaction is active", most notably :

Does "if no transaction is active" mean
a) if no transaction is present on the current thread
b) if no transaction in state ACTIVE is present on the current thread
(or something entirely different)?
More concrete: how should registerInterposedSynchronization() behave
in case the current transaction is marked for rollback? Should it
reject the action with an IllegalStateException or accept the
registered synchronization and execute afterCompletion() when the
rollback actually happens?
(Maybe  for the next version the wording could be made non-ambiguous?)

For reference: I'm asking because of the discussion on

Thanks in advance,

Back to the top