HFEJB - q 18 page 371 The answer says that ejbRemove runs in the transaction context of the method that causes their invocations. I read in the spec that a transaction type must be mentioned for ejbRemove(). If I am mentioning a transaction of 'RequiredNew' then how come ejbRemove would run under the tx of the invoker. thanks. - walk rustin
posted 13 years ago
ejbSelect() and ejbLoad() methods run in the transaction context of the called business method exposed in the remote interface. ejbRemove() runs in the transaction context of the corresponding remove() method, present in the home/remote interface. (the transaction context attribute needs to be specified for both the remove methods in the home interface remove(handle),remove(primarykey) and also remove() method of the remote interface in the DD). The question could have been properly phrased as : Which method(s) run in the transaction context of the business method that causes their invocation?.... (the word business is missing in the actual question in the book) then there are only 2 answers, ejbSelect() and ejbLoad(), else 3 answers including ejbRemove. ejbActivate(), ejbPassivate() and setEntityContext() anyway run in an unspecified transaction context. [ March 19, 2004: Message edited by: Vish Kumar ]
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads