2 BMT ejbs 1 single TX = impossible?

90 Views Asked by At

In brief, and with linking to this topic: Is it possible to have 2 EJBs having Bean managed Transactions nature in which the first EJB calls a method in the second one and all are wrapped in single UserTransaction that starts from the first EJB?

1

There are 1 best solutions below

0
On

It can be achieved through workaround like extending the BMT, the bean that you would like to inject, into a new class and annotate it as alternative bean and then inject the new annotated class into another BMT. It will work as a single transaction starting from BMT to the new annotated bean and ended by the caller BMT