Browse Source

DEC-22102 fix:【专题】11.0工程,数据连接管理,INFORMIX数据连接失败,驱动管理上传可以成功

final/11.0
lidongy 3 years ago
parent
commit
4eb7f1770f
  1. 23
      fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidConnectionHolder.java

23
fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidConnectionHolder.java

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

Loading…
Cancel
Save