Closed fantacy2001 closed 3 years ago
@cherrylzhao This issue has a clear description. Could you give it a look?
ShardingSphere don't care about the status of underlying datasource pool, <mvn.dbcp.defaultAutoCommit>false</mvn.dbcp.defaultAutoCommit>
will not effective.
I think you can get the connection from jdbcTemplate, then do the transaction control manually like that
connection.setAutoCommit(false)
....
connection.commit()
ShardingSphereConnection should be managing its own logic tx-auto-commit status, avoid to use underlying physical connnections. Consider about two underlying connnections, one with auto-commit, one with not.
@fantacy2001, Hi, can you summary the title for search friendly?
@fantacy2001, Hi, can you summary the title for search friendly?
OK,has Modified
It is recommended not to configure ‘autocommit‘’ in datasource properties
i use sharding jdbc+mybatis+spring
sharding two db, one master two slave 。
spring config:
connect pool autoCommit is configed 'false'