Choose the decision supported by each JDBC contract.
Read the lessons
- Java JDBC savepoints: roll back one optional step inside a transaction
- Java JDBC setNull: bind a nullable column with its SQL type
- Java JDBC query timeout: bound a statement without claiming a whole-request deadline
- Java JDBC ResultSet binary streams: read before advancing the cursor
- Java JDBC read-only mode: use the hint without treating it as authorization
- Java SQLWarning: inspect nonfatal database diagnostics before reuse
- Java DatabaseMetaData: check features before depending on them
- Java JDBC cursor holdability: choose what commit does to a ResultSet
- Java SQLException chains: preserve SQLState and linked failures
- Java JDBC binary parameters: cap bytes before binding a BLOB
Common Mistakes
Do not treat a driver hint, timeout, or warning check as a complete transaction policy.
