Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jta-dev] [cdi-dev] @Inject UserTransaction in CDI spec, should be in Transactions?

Hi,

The injection of UserTransaction is already mentioned in the Transactions spec, but only as an example how to acquire it using injection (actually 2 examples, one using @Resource injection, another one using @Inject injection). But the spec should be more concrete and at least state that in CDI container, injection using @Inject should be supported and in an EJB container, injection using @Resource should be supported. I don't know if this requirement is covered by any tests in the TCK. If not, then some new tests should cover it.

For CDI, I would leave the requirement there because it's only in the section for Jakarta EE and it neatly summarizes all injectable built-in beans. However, injection of UserTransaction and none of the other beans mentioned in 9.8. Additional built-in beans isn't supported in the new Jakarta EE Core profile. So it would be better if this section is moved to each particular profile if applicable (ie. moved to Full and Web profiles and not to Core profile, at least until there are any built-in beans supported by Core profile).


All the best,,
Ondro Mihalyi

Director, Jakarta EE expert
OmniFish - Jakarta EE Consulting & Support | www.omnifish.ee
Omnifish OÜ, Narva mnt 5, 10117 Tallinn, Estonia | VAT: EE102487932

On Sun, Aug 7, 2022 at 2:30 PM arjan tijms <arjan.tijms@xxxxxxxxx> wrote:
Hi,

The Jakarta Transactions spec takes care of the @Transactional interceptor and the @TransactionScoped scope. However, the injection of UserTransaction is specified by the CDI spec.

As UserTransaction is owned by Jakarta Transactions, I think it should be Jakarta Transactions that is responsible for making sure this type is injectable.

Thoughts?

Kind regards,
Arjan Tijms
_______________________________________________
cdi-dev mailing list
cdi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdi-dev

Back to the top