This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Nested Transaction

 
prem karun gopal
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I know that EJB doesnt support nested transactions.
But am confused about this scenario.
Session Bean A exists.
A has following methods A.foo1(),A.foo2().A.foo3()
Transaction attributes for these methods are
RequiredNew,Required,RequiresNew.
foo1() {
foo2();
foo3();
}
So in this case foo1 and thereby foo2 's transaction gets suspended when it calls foo3 ,after foo3 the suspended one resumes again.
Does this scenario comes under Nested Transaction Or seems like Nested Transaction.Pls comment on this.
Also friends pls give me some info about NestedTransactions.I am a bit confused abt this Transaction Model.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not a nested transaction. The outer transaction scope is suspended while the inner transaction executes. If the outer transaction fails after the inner transaction has completed, then things remain as they are after the completion of the inner transaction.
A "Nested transaction" would mean that if the outer transaction fails the the inner transaction would roll back as well.
Kyle
 
Ravi Ramachandra
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kyle,
Is the RequiresNew equivalent to the concept of Aitonomous Transaction concept in Oracle 9i?
Thanks
Ravi
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea, I'm not familiar with that concept in Oracle 9i.
Kyle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic