java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.SQLTransientException
java.sql.SQLTransientConnectionException
public class SQLTransientConnectionException
SQLState 类值为“08”时抛出的 SQLException 子类,表示在没有进行任何应用程序级更改的情况下重试操作时,失败的连接操作可以成功。
| 构造方法摘要 | |
|---|---|
SQLTransientConnectionException() 构造一个 SQLTransientConnectionException 对象。 |
|
SQLTransientConnectionException(String reason) 构造一个带有给定 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(Throwable cause) 构造一个带有给定 cause 的 SQLTransientConnectionException 对象。 |
|
| 方法摘要 |
|---|
| 从类 java.sql.SQLException 继承的方法 |
|---|
getErrorCode, getNextException, getSQLState, iterator, setNextException |
| 从类 java.lang.Throwable 继承的方法 |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public SQLTransientConnectionException()
SQLTransientConnectionException 对象。
reason 和
SQLState 初始化为
null,供应商代码初始化为 0。
cause 没有初始化,随后可以调用
Throwable.initCause(java.lang.Throwable) 方法初始化。
public SQLTransientConnectionException(String reason)
reason 的
SQLTransientConnectionException 对象。
SQLState 初始化为
null,供应商代码初始化为 0。
cause 没有初始化,随后可以调用
Throwable.initCause(java.lang.Throwable) 方法初始化。
reason - 对异常的描述
public SQLTransientConnectionException(String reason, String SQLState)
reason 和
SQLState 的
SQLTransientConnectionException 对象。
cause 没有初始化,随后可以调用
Throwable.initCause(java.lang.Throwable) 方法初始化。供应商代码初始化为 0。
reason - 对异常的描述
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
public SQLTransientConnectionException(String reason, String SQLState, int vendorCode)
reason、
SQLState 和
vendorCode 的
SQLTransientConnectionException 对象。
cause 没有初始化,随后可以调用
Throwable.initCause(java.lang.Throwable) 方法初始化。
reason - 对异常的描述
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
vendorCode - 特定于数据库供应商的异常代码
public SQLTransientConnectionException(Throwable cause)
cause 的
SQLTransientConnectionException 对象。
SQLState 初始化为
null,供应商代码初始化为 0。如果
cause==null,那么
reason 初始化为
null;如果
cause!=null,则初始化为
cause.toString()。
cause - 此
SQLException 的底层原因(保存此原因,以供以后通过
getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
public SQLTransientConnectionException(String reason, Throwable cause)
reason 和
cause 的
SQLTransientConnectionException 对象。
SQLState 初始化为
null,供应商代码初始化为 0。
reason - 对异常的描述。
cause - 此
SQLException 的底层原因(保存此原因,以供以后通过
getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
public SQLTransientConnectionException(String reason, String SQLState, Throwable cause)
reason、
SQLState 和
cause 的
SQLTransientConnectionException 对象。供应商代码初始化为 0。
reason - 对异常的描述。
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
cause - 此
SQLException 的底层原因(保存此原因,以供以后通过
getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
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,表示 cause 不存在或未知。