Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transactions  RSS feed

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am bit confused about transaction. In one of my previous projects, we used java.sql.Connection methods to control the transaction.

Eg
Connection con = //som connection
try {
//some sql stuff;
con.commit();
//do some sql stuff
} catch (Exception e) {
con.rollback();
}

The above was a web project.

I also read that there is something called UserTransaction. Is there any difference between the two.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also read that there is something called UserTransaction.


There is a specific API for writing applications that have distributed transactions. Java Transaction API (JTA) The JTA is well-suited for enterprise systems with complex transactional requirements.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!