Description
If you enable autoCommit against a server without an active transaction, it will fail, e.g.:
connection.setAutoCommit(false);
connection.setAutoCommit(true);
throws: Transaction was not initialized
connection.setAutoCommit(false);
// do something in the transaction
connection.commit();
connection.setAutoCommit(true);
throws: No transaction to commit
connection.setAutoCommit(false);
// do something in the transaction
connection.rollback();
connection.setAutoCommit(true);
throws: No transaction to commit
Metadata
Metadata
Assignees
Labels
No labels