Browse Source

REPORT-74418 informix等老驱动未实现部分Connection接口导致druid创建线程退出

release/11.0
rinoux 2 years ago
parent
commit
8149d3a292
  1. 9
      fine-druid/src/main/java/com/fr/third/alibaba/druid/pool/DruidConnectionHolder.java

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

@ -122,10 +122,7 @@ public final class DruidConnectionHolder {
if (initUnderlyHoldability) { if (initUnderlyHoldability) {
try { try {
this.underlyingHoldability = conn.getHoldability(); this.underlyingHoldability = conn.getHoldability();
} catch (UnsupportedOperationException e) { } catch (UnsupportedOperationException | AbstractMethodError | SQLFeatureNotSupportedException e) {
holdabilityUnsupported = true;
LOG.warn("getHoldability unsupported", e);
} catch (SQLFeatureNotSupportedException e) {
holdabilityUnsupported = true; holdabilityUnsupported = true;
LOG.warn("getHoldability unsupported", e); LOG.warn("getHoldability unsupported", e);
} catch (SQLException e) { } catch (SQLException e) {
@ -134,8 +131,8 @@ public final class DruidConnectionHolder {
holdabilityUnsupported = true; holdabilityUnsupported = true;
} }
LOG.warn("getHoldability error", e); LOG.warn("getHoldability error", e);
} catch (AbstractMethodError e) { } catch (Throwable e) {
LOG.warn("getHoldability unsupported", e); LOG.warn("getHoldability error", e);
} }
} }
} }

Loading…
Cancel
Save