Transaction Management in java is required when we are dealing with relational databases.We use JDBC API for database operations and today we will learn how to use JDBC transaction management.
By default when we create a database connection, it runs in auto-commit mode. It means that whenever we execute a query and it's completed,the commit is fired automatically.So every SQL query we fire is a transaction and if we are running some DML or DDL queries,the changes are getting saved into database after every SQL statement finishes.
Disabling Auto-Commit Mode
Using Transactions to Preserve Data Integrity
Setting and Rolling Back to Savepoints
When to Call Method rollback