当使用spring@Transactional时,隔离和传播最终由谁来完成,是spring框架还是数据库?
When using spring @Transactional,who eventually does the isolation and propagation work,the springframework or the database?
哪个是 happening:the 框架告诉数据库开始一个事务并使用 @Transaction
中设置的隔离级别,或者框架处理所有事情而数据库对此一无所知?
如果数据库可以工作,当您将 @Transactional
中的隔离设置为数据库不支持的级别时会发生什么,例如,将其设置为可重复读取但数据库是 oracle?
the framework tells the database to start a transaction and using the isolation level set in @Transactional
是
what will happen when you set isolation in @Transactional to a level the database doesn't support
最后,归结为在 JDBC 驱动程序返回的 JDBC 连接上设置隔离级别。我不确定规范中是否有严格的规则(javadoc 帮助不大),但我假设 SQLException 将(或至少应该)由 JDBC 驱动程序抛出。试一试,你就会知道。
哪个是 happening:the 框架告诉数据库开始一个事务并使用 @Transaction
中设置的隔离级别,或者框架处理所有事情而数据库对此一无所知?
如果数据库可以工作,当您将 @Transactional
中的隔离设置为数据库不支持的级别时会发生什么,例如,将其设置为可重复读取但数据库是 oracle?
the framework tells the database to start a transaction and using the isolation level set in @Transactional
是
what will happen when you set isolation in @Transactional to a level the database doesn't support
最后,归结为在 JDBC 驱动程序返回的 JDBC 连接上设置隔离级别。我不确定规范中是否有严格的规则(javadoc 帮助不大),但我假设 SQLException 将(或至少应该)由 JDBC 驱动程序抛出。试一试,你就会知道。