aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Nested Transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Nested Transaction" Watch "Nested Transaction" New topic
Author

Nested Transaction

prem karun gopal
Greenhorn

Joined: Dec 03, 2003
Posts: 24
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.


Prem Kumar.k<br />Email :write2premk@yahoo.com
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
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


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Ravi Ramachandra
Greenhorn

Joined: Dec 01, 2003
Posts: 6
Hi Kyle,
Is the RequiresNew equivalent to the concept of Aitonomous Transaction concept in Oracle 9i?
Thanks
Ravi
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
I have no idea, I'm not familiar with that concept in Oracle 9i.
Kyle
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nested Transaction