What is default isolation level hibernate uses if not explicitly set?

前端 未结 1 921
情深已故
情深已故 2021-02-01 17:08

I have an application that uses hibernate version 3.6.4, and c3p0 version 0.9.1.2 for connection pooling. My underlying RDBMS is MySql version 5.0.67.

My installation o

相关标签:
1条回答
  • 2021-02-01 17:42

    looks like meta.getDefaultTransactionIsolation()); is hardcoded in the implementation of DatabaseMetaData in the mysql driver

    public class DatabaseMetaData implements java.sql.DatabaseMetaData lines....

    
    1475    public int getDefaultTransactionIsolation() throws java.sql.SQLException JavaDoc {
    1476        if (this.conn.supportsIsolationLevel()) {
    1477            return java.sql.Connection.TRANSACTION_READ_COMMITTED;
    1478        } else {
    1479            return java.sql.Connection.TRANSACTION_NONE;
    1480        }
    1481    }
    

    so i'd bet and trust getSession().connection().getTransactionIsolation()

    0 讨论(0)
提交回复
热议问题