This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes A question about use of userTransaction and Connections 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 "A question about use of userTransaction and Connections" Watch "A question about use of userTransaction and Connections" New topic
Author

A question about use of userTransaction and Connections

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
Thank you for reading my post
can some one please help me understand a scenario like this:

con1.setAutoCommit(false)
con2.setAutoCommit(false)

{
utx.begin()
.....
....
con1.commit();
con2.commit();


utx.rollback();

I need to rollback even commited connections if my utx rolled back, is it doable?

thanks
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

When you are using a user transaction, then you should not call commit/rollback on individual resources.
You should only call commit/rollback on the user transaction object.


apigee, a better way to API!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A question about use of userTransaction and Connections
 
Similar Threads
JDBC Transactions across multiple databases
Doubt in JAXR: FederatedConnection
JDBC auto-commit
CMT and Connection Objects
CMT and Connection Objects