posted 19 years ago
>>>1. What is reentrant?
-> A reentrant bean can participate in loopback call sequences, which are call sequences where one of the bean's methods calls another component which in turn calls a method in the calling bean instance. Such requirement hardly arise in practice.
>>>2. If relations between entities need that both entities be local, does that lead to most (if not all?!) of the entity beans being local in an application?
-> Yes. Infact, I would like to keep all my entity beans local to the container and have coarse-grained session facades playing with the entity beans.
>>>3. What is the exact difference between a distirbuted vs a local transaction? Does a local transaction actually mean that all the participating beans/resources/classes etc are local?
-> Think of a distributed transaction as the one that can span across containers/database servers deployed on physically different machines. The containers/database servers can themselves be from different vendors.
>>>4. This is in reference to the HFEJB chapter 10 - 9th exercise -
Which actions will the container take if a MDB with BMT demarcation throws a system exception?
One of the correct answers is -
'Mark the transaction for rollback'
Now, if it is a system exception, won't the transaction be rolled back? Instead of just being marked for a rollback?
-> The container has to first mark the transaction for rollback so that callers of a method can 'check', using context.getRollbackOnly(), if the call was a success and possibly take a different action path or stop proceeding altogether (or some kind of optimization).
SCJP, SCWCD, SCBCD, OCA J8