File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Transaction Inside Transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction Inside Transaction" Watch "Transaction Inside Transaction" New topic

Transaction Inside Transaction

karthik manick
Ranch Hand

Joined: Aug 25, 2009
Posts: 52
Can i have a new transaction inside a transaction.
This is needed since i want to commit only a particluar flow inside a transaction. And later i want to commit the entire outside transaction.(I am using Usertransaction type)
karthik manick
Ranch Hand

Joined: Aug 25, 2009
Posts: 52
Please help me on this.
E Armitage

Joined: Mar 17, 2012
Posts: 892
You can invoke methods that start a new transaction while the first transaction is suspended but you need to explain your requirements more here.
Why are these transactions related? What happens if the second flows fail to commit after the first has already been committed?
I agree. Here's the link:
subject: Transaction Inside Transaction
Similar Threads
Using commit and rollback
transaction.commit() is this necessary if we didn't do any data manipulation on database?
when is Transaction used in hibernate?
Exception handling in EJB with Container Managed Transaction using Hibernate