As we know from here , here and here for a start, calling close on a JDBC connection to Oracle results in a commit although this may not be the case for other JDBC drivers.
I can do a rollback before closing specifically for Oracle, but I was curious whether anybody knows if I can switch this off when opening the connection in a similar way to switching off the auto commit? Thank you.
您可以尝试子类化Connection类并在构造函数中设置autoCommit = false
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.