A new connection object is normally in auto-commit mode by default, meaning that when a statement is completed, the commit method will be called on that statement automatically. In this case, since each statement is committed individually, a transaction consists of only one statement. If auto-commit mode has been disabled, a transaction will not terminate until the commit or rollback is called explicitly. All the statements that have been executed since the previous commit or rollback are affected by the next commit or rollback.
The beginning of a transaction requires no explicit call: it is implicitly initiated after disabling auto-commit mode or after calling the commit method or rollback method. The commit method sets the database to a state that reflects all the effects of the transaction statements, and releases any locks held by the transaction. The rollback method discards those changes, leaving the database in an unchanged state.
If one operation on a database should take effect only if another operation also succeeds, then the two operations are done within one transaction, by disabling auto-commit. If both updates succeed, then the commit method is called, and the effects of both updates are permanent. If one fails or both fail, then the rollback method is called, and the values that existed before the updates were executed are restored.
JDBC services provided by the toolkit disable the auto-commit mode of the database connection they are going to use; then, depending on the autoCommit attribute value set in the services definition file, the service invoker commits or rolls back the statements (or the service itself does so.)