★ wanayoo — archive 1999 http://java.sun.com/developer/codesamples/trans.htmlNouvelle recherche | Portail wanayoo
Skip Masthead Links developers.sun.com   » search tips  |  Search:     
The Source for Java Developers
Sun Microsystems
 
 
Index of Code Samples
Distributed Transactions Code Samples
 

A transaction can end with a commit or a rollback. When a transaction commits, the data modifications made by its statements are saved. If a statement within a transaction fails, the transaction rolls back, undoing the effects of all statements in the transaction. Undoing data posted to the database can be tricky if the transaction involves updating two or more columns in one table or updating more than one table because you want to be sure not to leave any partial data behind. The Java programming language provides APIs for handling distributed transactions.