Hi, I'm not sure about that: the specs say that a stateful session bean may commit a started transaction before the business method returns. Instead, for stateless session bean/mdb I suppose that it means that if I create a transaction in a business method, I have to commit before return. The same is for timeout callback methods.
Finally, in 13.6.1, the specs say:
If a stateless session bean instance starts a transaction in a business method or interceptor method, it must commit the transaction before the business method (or all its interceptor methods) returns.
Mmmhh, forget by previous "yes". Thinking about it twice, it does not seem possible. By the way, when a timeout happens in a MDB, in which transaction context will the timeout callback run ? Unspecified transaction context ?
Joined: May 14, 2007
According to what I remember, timeout callback transaction rules are the same as a business method, except for the fact that, in case of container managed transaction, it can be only REQUIRED, REQUIRES_NEW and NOT_SUPPORTED.
Joined: May 15, 2005
Thanks, but the option to the question was so confusing. I hope the questions in the real exam are clear & crip!!