Search code examples
mysqljdbcconnection-poolingautocommit

in mysql jdbc does auto commit affect all connections?


when using a connection pool, will setting a connection's autocommit = false affect this connection only?

if i close this connection without setting autocommit = true and get a new connection will this connection's policy be set to autocommit= true?


Solution

  • The answer would to the point be: "depends on the connection pool used".

    However, if I was a connection pool, I would have restored the autocommit state as per the initial configuration. I think that other connection pools would do the same.