Skip to main content

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

Thank you for raising the topic, Norbert. I would also like to hear from vendors if they are would like to share their interpretation of whether the specification clearly defines whether an active transaction must be in STATUS_ACTIVE [1].


On Mon, 11 Oct 2021 at 09:06, Norbert Wirges <norbert.wirges00+eclipse@xxxxxxxxx> wrote:
Hi.

I already tried asking this on the JTA forum
(https://www.eclipse.org/forums/index.php/t/1109138/)., but did not
get a response.

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

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
https://issues.redhat.com/browse/WFLY-15377

Thanks in advance,
Norbert
_______________________________________________
jta-dev mailing list
jta-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jta-dev


Back to the top