Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jta-dev] Definition of active?

On Mon, Nov 14, 2022 at 6:19 AM Michael Musgrove <mmusgrov@xxxxxxxxxx> wrote:
I take the viewpoint that the JTA spec should be read in conjunction with the OMG OTS specification, on which JTA is based. The definition is:

Active means "The state of a transaction when processing is in progress and completion of the transaction has not yet commenced.".

Oh! OK, that would explain, I guess, why, for example, in its implementation of TransactionSynchronizationRegistry#getResource(), Narayana does a status code check for either STATUS_ACTIVE or STATUS_MARKED_ROLLBACK to decide if a transaction is active or not before possibly throwing an IllegalStateException, which the API docs say must be thrown when "no transaction is active".  How odd that this critical definition does not actually appear in the JTA specification itself!  So there are normative terms that govern JTA implementations that are not actually present in the JTA specification?  Good to know.  Thanks very much for the pointer.

Best,
Laird

Back to the top