Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown


Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Bookmark Topic Watch Topic
  • New Topic