Local transactions using JDBC 2.0 API
Transaction Processing With Java
Listing 1. Local transactions using JDBC 2.0 API.
- By Salih Ergul
- February 5, 2001
// First get a connection, assuming that ds is of type
Connection con = ds.getConnection(...);
// Do all the work as a single transaction
// The actual work goes here. You can query and update
// multiple tables in the database
// Commit the transaction
// Close the connection
Salih Ergül is a graduate student at the Technical University of Vienna, Austria. Salih specializes in distributed object/component systems. He can be contacted at [email protected].