All along, it is assumed that connection if Setautocommit (false) is set, the manual transaction commit must be initiated manually or rollback. There was a problem today and the results were very surprising.
The results were tested as follows (note that under Oracle drivers, other environments are unknown):
1, set the Setautocommit (false) after performing the subsequent DML data update operation, did not explicitly manually commit or rollback, finally set Setautocommit (true), after closing the connection, the default submission succeeds.
2, set the Setautocommit (false) after performing the subsequent DML data update operation, the execution of two SQL updates, intermediate Rollback, the first part of the rollback, the second part does not explicitly manually commit, default commit.
3, set the Setautocommit (false) after performing the subsequent DML data update operation, did not explicitly manually commit or rollback, and finally did not set Setautocommit (true), close the connection, the default submission succeeds.
Summary: When Setautocommit (false) is set, the default commit is not specified unless explicitly rollback, without any explicit commit or rollback, setting the setting Setautocommit (true) or closing the connection. The previous transaction will also be submitted by default.
About Jave Transaction commit and rollback issues under Oracle Drive