Hi Frits. Thanks so much for the clarification. The explanation is much clearer than the reference materials.
The reference materials just simply says there is no nested transaction and your explanation elaborate this point for both CMT and BMT.
From the
J2EE tutorial,
http://docs.oracle.com/javaee/5/tutorial/doc/bncij.html , Figure 33-1 describes how the transaction management attributes work.
So, does it mean figure 33-1 does not apply to the following scenarios:
1. if it is CMT, a stateful bean instance 1 cannot execute its transaction TX2 within TX1 of the
same bean instance via SessionBeanContext().getBusinessObject() (this is a loopback call refer to your notes p.18)? Not possible at all.
2. if it is BMT, stateful bean instance 2's TX2 will suspend TX1.
However, Figure 33-1 may apply to this:
if it is CMT, a stateful bean instance 1 can execute its transaction TX2 within TX1 of a
different instance of the same bean class, say instance 2 (avoid reentrancy) (idea is the same as stateless bean on p.18)
?
It really seems to me that
Figure 33-1 will only apply to MDB, stateless bean ,singleton bean and stateful bean (but two different instances of this bean). But this tutorial does not say so.