good catch. It should be as simple as adding @Priority as you noted.

The rest needs a close review. Maybe we can get rid of some parts.
Note that the DS @Transactional is kind of a 'cheap mans XA' as well.
Out of this it might have become a bit over-engineered even.
But it's working really fine, so we should be careful.

txs and LieGrue,
strub

> Am 07.02.2024 um 09:28 schrieb Thomas Frühbeck <t.fruehb...@gmail.com>:
> 
> Hi,
> the concept of Deltaspike globalAlternatives has been removed - I assume in
> accordance with arrival of @Priority(APPLICATION).
> Therefore the alternative TransactionStrategy implementations - currently
> in jpa-impl are not reachable for an application restricted to the API at
> all - at least in Weld.
> Furthermore the documentation proposes the use of <alternatives> in
> beans.xml, which does not propagate to jpa-impl module e.g. QueryHandler.
> 
> I therfore propose to move - at least - the alternative implementations of
> TransactionStrategy ContainerManagedTransactionStrategy etc. to jpa-api and
> adding an example implementation of a working new global alternative to
> documentation in the lines of:
> 
> @Dependent
> @Alternative
> @Priority(Interceptor.Priority.APPLICATION + 1)
> public class AppTransactionStrategy extends
> ContainerManagedTransactionStrategy {
> }
> 
> I think that the advent of 2.0.0 would be the right time to redisiign this
> important aspect.
> What do yout think?
> Thomas F.

Reply via email to