27
28 import java.sql.SQLException;
29 import java.io.Reader;
30
31 import javax.sql.RowSetWriter;
32 import javax.sql.rowset.*;
33 import java.sql.Savepoint;
34
35 /**
36 * A specialized interface that facilitates an extension of the standard
37 * <code>SyncProvider</code> abstract class so that it has finer grained
38 * transaction control.
39 * <p>
40 * If one or more disconnected <code>RowSet</code> objects are participating
41 * in a global transaction, they may wish to coordinate their synchronization
42 * commits to preserve data integrity and reduce the number of
43 * synchronization exceptions. If this is the case, an application should set
44 * the <code>CachedRowSet</code> constant <code>COMMIT_ON_ACCEPT_CHANGES</code>
45 * to <code>false</code> and use the <code>commit</code> and <code>rollback</code>
46 * methods defined in this interface to manage transaction boundaries.
47 */
48 public interface TransactionalWriter extends RowSetWriter {
49
50 /**
51 * Makes permanent all changes that have been performed by the
52 * <code>acceptChanges</code> method since the last call to either the
53 * <code>commit</code> or <code>rollback</code> methods.
54 * This method should be used only when auto-commit mode has been disabled.
55 *
56 * @throws SQLException if a database access error occurs or the
57 * <code>Connection</code> object within this <code>CachedRowSet</code>
58 * object is in auto-commit mode
59 */
60 public void commit() throws SQLException;
61
62 /**
63 * Undoes all changes made in the current transaction. This method should be
64 * used only when auto-commit mode has been disabled.
65 *
66 * @throws SQLException if a database access error occurs or the <code>Connection</code>
|
27
28 import java.sql.SQLException;
29 import java.io.Reader;
30
31 import javax.sql.RowSetWriter;
32 import javax.sql.rowset.*;
33 import java.sql.Savepoint;
34
35 /**
36 * A specialized interface that facilitates an extension of the standard
37 * <code>SyncProvider</code> abstract class so that it has finer grained
38 * transaction control.
39 * <p>
40 * If one or more disconnected <code>RowSet</code> objects are participating
41 * in a global transaction, they may wish to coordinate their synchronization
42 * commits to preserve data integrity and reduce the number of
43 * synchronization exceptions. If this is the case, an application should set
44 * the <code>CachedRowSet</code> constant <code>COMMIT_ON_ACCEPT_CHANGES</code>
45 * to <code>false</code> and use the <code>commit</code> and <code>rollback</code>
46 * methods defined in this interface to manage transaction boundaries.
47 *
48 * @since 1.5
49 */
50 public interface TransactionalWriter extends RowSetWriter {
51
52 /**
53 * Makes permanent all changes that have been performed by the
54 * <code>acceptChanges</code> method since the last call to either the
55 * <code>commit</code> or <code>rollback</code> methods.
56 * This method should be used only when auto-commit mode has been disabled.
57 *
58 * @throws SQLException if a database access error occurs or the
59 * <code>Connection</code> object within this <code>CachedRowSet</code>
60 * object is in auto-commit mode
61 */
62 public void commit() throws SQLException;
63
64 /**
65 * Undoes all changes made in the current transaction. This method should be
66 * used only when auto-commit mode has been disabled.
67 *
68 * @throws SQLException if a database access error occurs or the <code>Connection</code>
|