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 21, 2022 at 1:58 PM Michael Musgrove <mmusgrov@xxxxxxxxxx> wrote:
There is only one usage of active in the JTA sense of the word in main specification (in the section you referenced):

"The jakarta.transaction.TransactionScoped annotation provides the ability to specify a standard Jakarta Context Dependency Injection scope to define bean instances whose lifecycle is scoped to the currently active Jakarta Transactions transaction."

All of the other usages of the term are referring to CDI contexts [1] which are different from the JTA transaction context.


I see one more use of "active" that could use clarification:

"The object with this annotation will be associated with the current active Jakarta Transactions transaction when the object is used."  If I'm "in" a method marked @Transactional, and there is a "Jakarta Transactions transaction" that has been marked for rollback, and I manipulate the TransactionSynchronizationRegistry from within this method—isn't this legal?  If so, then "active" here must also mean "active or marked for rollback" I think.

Best,
Laird

Back to the top