ConnectionSequence connSeq = localHelper.getConnectionSequence(this.getDataSource());
ConnectionHolder holder = connSeq.currentHolder();
if (holder.isOpen() == false || holder.hasTransaction() == false) {
defStatus.markNewConnection();/*新事物,新连接*/
}
holder.requested();
//下面两行代码用于保存当前Connection的隔离级别,并且设置新的隔离级别。
int isolationLevel = holder.getConnection().getTransactionIsolation();
Isolation level = null;
if (defStatus.getIsolationLevel() != Isolation.DEFAULT) {
holder.getConnection().setTransactionIsolation(defStatus.getIsolationLevel().ordinal());