Lets say bean method foo1Required() is running under transaction tx1. Lets say inside foo1Required() it invokes another method foo2RequiresNew().
The method names also indicate the tx attribute declared in the dd. Inside foo2RequiresNew() the transaction is a new transaction and it cannot see the transaction in foo1Required().
Which means the changes made to bean fields inside the foo1Required() method before the foo2RequiresNew() method should not be visible to foo2RequiresNew() method. But to make life easy I guess it should be visible. If foo2RequiresNew() method completes then the method foo1Required() takes over with bean fields changed by foo2RequiresNew() But if now there is a rollback how does rollback effect this?
Changes to the bean fields inside foo2RequiresNew() should be committed but those inside foo1Required() before and after the method call foo2RequiresNew() should not be commitede but rolled back. ==>How can that be?
==>Or is it that when a bean method invokes another bean method there is a special case and foo2RequiresNew would not start a new transaction?
Slime does not pay. Always keep your tiny ad dry.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop