Module java.sql
Package java.sql

Class SQLTransientConnectionException

所有已实现的接口:
Serializable, Iterable<Throwable>

public class SQLTransientConnectionException extends SQLTransientException
SQLState 类值为 '08' 或在供应商指定的条件下的 SQLException 子类。这表示如果在不进行任何应用级更改的情况下重试操作,则失败的连接操作可能会成功。

请查阅您的驱动程序供应商文档,了解可能抛出此 Exception 的供应商指定条件。

自从:
1.6
参见:
  • Constructor Details

    • SQLTransientConnectionException

      public SQLTransientConnectionException()
      Constructs a SQLTransientConnectionException object. The reason, SQLState are initialized to null and the vendor code is initialized to 0. The cause is not initialized, and may subsequently be initialized by a call to the Throwable.initCause(java.lang.Throwable) method.
      自从:
      1.6
    • SQLTransientConnectionException

      public SQLTransientConnectionException(String reason)
      构造一个带有给定 reasonSQLTransientConnectionException 对象。 SQLState 初始化为 null,供应商代码初始化为 0。未初始化 cause,可以随后通过调用 Throwable.initCause(java.lang.Throwable) 方法进行初始化。
      参数:
      reason - 异常的描述
      自从:
      1.6
    • SQLTransientConnectionException

      public SQLTransientConnectionException(String reason, String SQLState)
      构造一个带有给定 reasonSQLStateSQLTransientConnectionException 对象。未初始化 cause,可以随后通过调用 Throwable.initCause(java.lang.Throwable) 方法进行初始化。供应商代码初始化为 0。
      参数:
      reason - 异常的描述
      SQLState - 识别异常的 XOPEN 或 SQL:2003 代码
      自从:
      1.6
    • SQLTransientConnectionException

      public SQLTransientConnectionException(String reason, String SQLState, int vendorCode)
      构造一个带有给定 reasonSQLStatevendorCodeSQLTransientConnectionException 对象。未初始化 cause,可以随后通过调用 Throwable.initCause(java.lang.Throwable) 方法进行初始化。
      参数:
      reason - 异常的描述
      SQLState - 识别异常的 XOPEN 或 SQL:2003 代码
      vendorCode - 数据库供应商特定的异常代码
      自从:
      1.6
    • SQLTransientConnectionException

      public SQLTransientConnectionException(Throwable cause)
      构造一个带有给定 causeSQLTransientConnectionException 对象。 SQLState 初始化为 null,供应商代码初始化为 0。如果 cause==null,则 reason 初始化为 null,如果 cause!=null,则 reason 初始化为 cause.toString()
      参数:
      cause - 此 SQLException 的根本原因(保存以便稍后通过 getCause() 方法检索);可能为 null,表示原因不存在或未知。
      自从:
      1.6
    • SQLTransientConnectionException

      public SQLTransientConnectionException(String reason, Throwable cause)
      构造一个带有给定 reasoncauseSQLTransientConnectionException 对象。 SQLState 初始化为 null,供应商代码初始化为 0。
      参数:
      reason - 异常的描述
      cause - 此 SQLException 的根本原因(保存以便稍后通过 getCause() 方法检索);可能为 null,表示原因不存在或未知。
      自从:
      1.6
    • SQLTransientConnectionException

      public SQLTransientConnectionException(String reason, String SQLState, Throwable cause)
      构造一个带有给定 reasonSQLStatecauseSQLTransientConnectionException 对象。供应商代码初始化为 0。
      参数:
      reason - 异常的描述
      SQLState - 识别异常的 XOPEN 或 SQL:2003 代码
      cause - 此 SQLException 的根本原因(保存以便稍后通过 getCause() 方法检索);可能为 null,表示原因不存在或未知。
      自从:
      1.6
    • SQLTransientConnectionException

      public SQLTransientConnectionException(String reason, String SQLState, int vendorCode, Throwable cause)
      构造一个带有给定 reasonSQLStatevendorCodecauseSQLTransientConnectionException 对象。
      参数:
      reason - 异常的描述
      SQLState - 识别异常的 XOPEN 或 SQL:2003 代码
      vendorCode - 数据库供应商特定的异常代码
      cause - 此 SQLException 的根本原因(保存以便稍后通过 getCause() 方法检索);可能为 null,表示原因不存在或未知。
      自从:
      1.6