This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi all I'd appreciate your opinions on this... Say a method with a transaction attribute of RequiresNew is called by a method that is already part of a transaction (call it T1). If the new transaction - created in order to satisfy the RequiresNew stipulation - (call it T2) is rolled back, will T1 be rolled back too? Given that EJB only supports flat transactions, it would seem to me that it would. Cheers, rt.
Hi Richard, If EJBs supported nested transactions (they don't) then T1 could be rolled back. But in reality, T1 is suspended by the container before T2 starts. So rolling back T2 should not affect T1. Regards, Andrew
Andrew Thanks for the reply. I think I get it now. As a supplementary, does that mean if the attribute was changed from RequiresNew to Requires, T1 *would* be rolled back because it would have been propagated to the called method - which then rolls back both? rt.
author and jackaroo