java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.SQLTransientException
java.sql.SQLTransientConnectionException
- 所有已实现的接口:
-
Serializable,Iterable<Throwable>
SQLState 类值为 '08' 或在供应商指定的条件下的
SQLException 子类。这表示如果在不进行任何应用级更改的情况下重试操作,则失败的连接操作可能会成功。
请查阅您的驱动程序供应商文档,了解可能抛出此 Exception 的供应商指定条件。
- 自从:
- 1.6
- 参见:
-
Constructor Summary
ConstructorsConstructorDescription构造一个SQLTransientConnectionException对象。构造一个带有给定reason的SQLTransientConnectionException对象。SQLTransientConnectionException(String reason, String SQLState) 构造一个带有给定reason和SQLState的SQLTransientConnectionException对象。SQLTransientConnectionException(String reason, String SQLState, int vendorCode) 构造一个带有给定reason、SQLState和vendorCode的SQLTransientConnectionException对象。SQLTransientConnectionException(String reason, String SQLState, int vendorCode, Throwable cause) 构造一个带有给定reason、SQLState、vendorCode和cause的SQLTransientConnectionException对象。SQLTransientConnectionException(String reason, String SQLState, Throwable cause) 构造一个带有给定reason、SQLState和cause的SQLTransientConnectionException对象。SQLTransientConnectionException(String reason, Throwable cause) 构造一个带有给定reason和cause的SQLTransientConnectionException对象。构造一个SQLTransientConnectionException对象,reason、SQLState初始化为null,供应商代码初始化为 0。未初始化cause,可以随后通过调用Throwable.initCause(java.lang.Throwable)方法进行初始化。 -
Method Summary
Methods declared in class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionMethods declared in class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods declared in interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SQLTransientConnectionException
public SQLTransientConnectionException()Constructs aSQLTransientConnectionExceptionobject. Thereason,SQLStateare initialized tonulland the vendor code is initialized to 0. Thecauseis not initialized, and may subsequently be initialized by a call to theThrowable.initCause(java.lang.Throwable)method.- 自从:
- 1.6
-
SQLTransientConnectionException
构造一个带有给定reason的SQLTransientConnectionException对象。SQLState初始化为null,供应商代码初始化为 0。未初始化cause,可以随后通过调用Throwable.initCause(java.lang.Throwable)方法进行初始化。- 参数:
-
reason- 异常的描述 - 自从:
- 1.6
-
SQLTransientConnectionException
构造一个带有给定reason和SQLState的SQLTransientConnectionException对象。未初始化cause,可以随后通过调用Throwable.initCause(java.lang.Throwable)方法进行初始化。供应商代码初始化为 0。- 参数:
-
reason- 异常的描述 -
SQLState- 识别异常的 XOPEN 或 SQL:2003 代码 - 自从:
- 1.6
-
SQLTransientConnectionException
构造一个带有给定reason、SQLState和vendorCode的SQLTransientConnectionException对象。未初始化cause,可以随后通过调用Throwable.initCause(java.lang.Throwable)方法进行初始化。- 参数:
-
reason- 异常的描述 -
SQLState- 识别异常的 XOPEN 或 SQL:2003 代码 -
vendorCode- 数据库供应商特定的异常代码 - 自从:
- 1.6
-
SQLTransientConnectionException
构造一个带有给定cause的SQLTransientConnectionException对象。SQLState初始化为null,供应商代码初始化为 0。如果cause==null,则reason初始化为null,如果cause!=null,则reason初始化为cause.toString()。- 参数:
-
cause- 此SQLException的根本原因(保存以便稍后通过getCause()方法检索);可能为 null,表示原因不存在或未知。 - 自从:
- 1.6
-
SQLTransientConnectionException
构造一个带有给定reason和cause的SQLTransientConnectionException对象。SQLState初始化为null,供应商代码初始化为 0。- 参数:
-
reason- 异常的描述 -
cause- 此SQLException的根本原因(保存以便稍后通过getCause()方法检索);可能为 null,表示原因不存在或未知。 - 自从:
- 1.6
-
SQLTransientConnectionException
构造一个带有给定reason、SQLState和cause的SQLTransientConnectionException对象。供应商代码初始化为 0。- 参数:
-
reason- 异常的描述 -
SQLState- 识别异常的 XOPEN 或 SQL:2003 代码 -
cause- 此SQLException的根本原因(保存以便稍后通过getCause()方法检索);可能为 null,表示原因不存在或未知。 - 自从:
- 1.6
-
SQLTransientConnectionException
public SQLTransientConnectionException(String reason, String SQLState, int vendorCode, Throwable cause) 构造一个带有给定reason、SQLState、vendorCode和cause的SQLTransientConnectionException对象。- 参数:
-
reason- 异常的描述 -
SQLState- 识别异常的 XOPEN 或 SQL:2003 代码 -
vendorCode- 数据库供应商特定的异常代码 -
cause- 此SQLException的根本原因(保存以便稍后通过getCause()方法检索);可能为 null,表示原因不存在或未知。 - 自从:
- 1.6
-