|
|
|
@ -77,22 +77,22 @@ public final class DruidConnectionHolder {
|
|
|
|
|
protected String initSchema; |
|
|
|
|
|
|
|
|
|
public DruidConnectionHolder(DruidAbstractDataSource dataSource, PhysicalConnectionInfo pyConnectInfo) |
|
|
|
|
throws SQLException{ |
|
|
|
|
throws SQLException{ |
|
|
|
|
this(dataSource, |
|
|
|
|
pyConnectInfo.getPhysicalConnection(), |
|
|
|
|
pyConnectInfo.getConnectNanoSpan(), |
|
|
|
|
pyConnectInfo.getVairiables(), |
|
|
|
|
pyConnectInfo.getGlobalVairiables()); |
|
|
|
|
pyConnectInfo.getPhysicalConnection(), |
|
|
|
|
pyConnectInfo.getConnectNanoSpan(), |
|
|
|
|
pyConnectInfo.getVairiables(), |
|
|
|
|
pyConnectInfo.getGlobalVairiables()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public DruidConnectionHolder(DruidAbstractDataSource dataSource, Connection conn, long connectNanoSpan) |
|
|
|
|
throws SQLException{ |
|
|
|
|
throws SQLException{ |
|
|
|
|
this(dataSource, conn, connectNanoSpan, null, null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public DruidConnectionHolder(DruidAbstractDataSource dataSource, Connection conn, long connectNanoSpan, |
|
|
|
|
Map<String, Object> variables, Map<String, Object> globleVariables) |
|
|
|
|
throws SQLException{ |
|
|
|
|
throws SQLException{ |
|
|
|
|
this.dataSource = dataSource; |
|
|
|
|
this.conn = conn; |
|
|
|
|
this.createNanoSpan = connectNanoSpan; |
|
|
|
@ -136,11 +136,16 @@ public final class DruidConnectionHolder {
|
|
|
|
|
holdabilityUnsupported = true; |
|
|
|
|
} |
|
|
|
|
LOG.warn("getHoldability error", e); |
|
|
|
|
} catch (AbstractMethodError e){ |
|
|
|
|
LOG.warn("getHoldability error", e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.underlyingReadOnly = conn.isReadOnly(); |
|
|
|
|
try { |
|
|
|
|
this.underlyingReadOnly = conn.isReadOnly(); |
|
|
|
|
} catch (Throwable e){ |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
this.underlyingTransactionIsolation = conn.getTransactionIsolation(); |
|
|
|
|
} catch (SQLException e) { |
|
|
|
@ -322,7 +327,7 @@ public final class DruidConnectionHolder {
|
|
|
|
|
Statement stmt = (Statement) item; |
|
|
|
|
JdbcUtils.close(stmt); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
statementTrace.clear(); |
|
|
|
|
} finally { |
|
|
|
|
lock.unlock(); |
|
|
|
|