The Connection object manages transaction boundaries.
In JDBC, the Connection object controls transaction boundaries through its methods. By default, JDBC connections are in auto-commit mode, meaning each SQL statement is treated as a transaction. Disabling auto-commit is necessary to group multiple statements into a single transaction. This is crucial in an e-commerce system where updating inventory and processing payment should happen within a single transaction to ensure consistency.
Additional Notes
How does the Connection object relate to transactions in JDBC?