JavaTM 2 Platform
Standard Ed. 6

java.sql
类 SQLTransientConnectionException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 java.sql.SQLException
              继承者 java.sql.SQLTransientException
                  继承者 java.sql.SQLTransientConnectionException
所有已实现的接口:
Serializable, Iterable<Throwable>

public class SQLTransientConnectionException
extends SQLTransientException

SQLState 类值为“08”时抛出的 SQLException 子类,表示在没有进行任何应用程序级更改的情况下重试操作时,失败的连接操作可以成功。

从以下版本开始:
1.6
另请参见:
序列化表格

构造方法摘要
SQLTransientConnectionException()
          构造一个 SQLTransientConnectionException 对象。
SQLTransientConnectionException(String reason)
          构造一个带有给定 reasonSQLTransientConnectionException 对象。
SQLTransientConnectionException(String reason, String SQLState)
          构造一个带有给定 reasonSQLStateSQLTransientConnectionException 对象。
SQLTransientConnectionException(String reason, String SQLState, int vendorCode)
          构造一个带有给定 reasonSQLStatevendorCodeSQLTransientConnectionException 对象。
SQLTransientConnectionException(String reason, String SQLState, int vendorCode, Throwable cause)
          构造一个带有给定 reasonSQLStatevendorCodecauseSQLTransientConnectionException 对象。
SQLTransientConnectionException(String reason, String SQLState, Throwable cause)
          构造一个带有给定 reasonSQLStatecauseSQLTransientConnectionException 对象。
SQLTransientConnectionException(String reason, Throwable cause)
          构造一个带有给定 reasoncauseSQLTransientConnectionException 对象。
SQLTransientConnectionException(Throwable cause)
          构造一个带有给定 causeSQLTransientConnectionException 对象。
 
方法摘要
 
从类 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
 

构造方法详细信息

SQLTransientConnectionException

public SQLTransientConnectionException()
构造一个 SQLTransientConnectionException 对象。reasonSQLState 初始化为 null,供应商代码初始化为 0。 cause 没有初始化,随后可以调用 Throwable.initCause(java.lang.Throwable) 方法初始化。

从以下版本开始:
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,则初始化为 cause.toString()

参数:
cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
从以下版本开始:
1.6

SQLTransientConnectionException

public SQLTransientConnectionException(String reason,
                                       Throwable cause)
构造一个带有给定 reasoncauseSQLTransientConnectionException 对象。SQLState 初始化为 null,供应商代码初始化为 0。

参数:
reason - 对异常的描述。
cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
从以下版本开始:
1.6

SQLTransientConnectionException

public SQLTransientConnectionException(String reason,
                                       String SQLState,
                                       Throwable cause)
构造一个带有给定 reasonSQLStatecauseSQLTransientConnectionException 对象。供应商代码初始化为 0。

参数:
reason - 对异常的描述。
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
从以下版本开始:
1.6

SQLTransientConnectionException

public SQLTransientConnectionException(String reason,
                                       String SQLState,
                                       int vendorCode,
                                       Throwable cause)
构造一个带有给定 reasonSQLStatevendorCodecauseSQLTransientConnectionException 对象。

参数:
reason - 对异常的描述
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
vendorCode - 特定于数据库供应商的异常代码
cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
从以下版本开始:
1.6

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only