Originally posted by Vince Hon: According to HFB p.206, Stateful SB will not run ejbActivate()/ejbPassivate() when the bean is in transaction.
What's the purpose of calling ctx.getUserTransaction() (BMT beans) in ejbPassivate() / ejbActivate() ? - HFB p. 207.
In the ejbPassivate() / ejbActivate(), why we CANNOT run CMT transaction methods (force tx to rollback, find out if a tx is rollede back) while we CAN run BMT trasaction methods ?
Hi! I think this has something to do when the transaction was started. When a bean is executing a method that is in a transaction PRIOR to passivation, then ejbPassivate() and ejbActivate() will never be called since the bean never gets passivated in the first place. But if a bean is not in a transaction then it gets passivated, you may start a transaction within your ejbPassivate() or ejbActivate() methods.
I hope that helps!
paul.com<br />SCJP, SCWCD, SCBCD, SCEA
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
a bit of art, as a gift, the permaculture playing cards