Skip to main content

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

So if we replace those two usages of "active" with "active (or marked for rollback)" in the specification and similarly for the three usages of active in the javadoc text for TransactionSynchronizationRegistry (not forgetting to changing the throws text to: "Throws:  IllegalStateException - a transaction is neither active nor marked for rollback") then will that be sufficient?

On Mon, Nov 21, 2022 at 10:59 PM Laird Nelson <ljnelson@xxxxxxxxx> wrote:
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.

jta-dev mailing list
To unsubscribe from this list, visit

Michael Musgrove

JBoss, by Red Hat
Registered Address: Red Hat Ltd, 6700 Cork Airport Business Park, Kinsale Road, Co. Cork.
Registered in the Companies Registration Office, Parnell House, 14 Parnell Square, Dublin 1, Ireland, No.304873
Directors:Michael Cunningham (USA), Vicky Wiseman (USA), Michael O'Neill, Keith Phelan, Matt Parson (USA)

Back to the top