JavaTM 2 Platform
Standard Ed. 6

java.sql
类 SQLNonTransientConnectionException

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

public class SQLNonTransientConnectionException
extends SQLNonTransientException

SQLState 类值为“08”时抛出的 SQLException 子类,表示在失败原因没有纠正的情况下重试操作时,失败的连接操作不会成功。

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

构造方法摘要
SQLNonTransientConnectionException()
          构造一个 SQLNonTransientConnectionException 对象。
SQLNonTransientConnectionException(String reason)
          构造一个带有给定 reasonSQLNonTransientConnectionException 对象。
SQLNonTransientConnectionException(String reason, String SQLState)
          构造一个带有给定 reasonSQLStateSQLNonTransientConnectionException 对象。
SQLNonTransientConnectionException(String reason, String SQLState, int vendorCode)
          构造一个带有给定 reasonSQLStatevendorCodeSQLNonTransientConnectionException 对象。
SQLNonTransientConnectionException(String reason, String SQLState, int vendorCode, Throwable cause)
          构造一个带有给定 reasonSQLStatevendorCodecauseSQLNonTransientConnectionException 对象。
SQLNonTransientConnectionException(String reason, String SQLState, Throwable cause)
          构造一个带有给定 reasonSQLStatecauseSQLNonTransientConnectionException 对象。
SQLNonTransientConnectionException(String reason, Throwable cause)
          构造一个带有给定 reasoncauseSQLTransientException 对象。
SQLNonTransientConnectionException(Throwable cause)
          构造一个带有给定 causeSQLNonTransientConnectionException 对象。
 
方法摘要
 
从类 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
 

构造方法详细信息

SQLNonTransientConnectionException

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

从以下版本开始:
1.6

SQLNonTransientConnectionException

public SQLNonTransientConnectionException(String reason)
构造一个带有给定 reasonSQLNonTransientConnectionException 对象。SQLState 初始化为 null,供应商代码初始化为 0。 cause 没有初始化,随后可以调用 Throwable.initCause(java.lang.Throwable) 方法初始化。

参数:
reason - 对异常的描述
从以下版本开始:
1.6

SQLNonTransientConnectionException

public SQLNonTransientConnectionException(String reason,
                                          String SQLState)
构造一个带有给定 reasonSQLStateSQLNonTransientConnectionException 对象。 cause 没有初始化,随后可以调用 Throwable.initCause(java.lang.Throwable) 方法初始化。供应商代码初始化为 0。

参数:
reason - 对异常的描述
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
从以下版本开始:
1.6

SQLNonTransientConnectionException

public SQLNonTransientConnectionException(String reason,
                                          String SQLState,
                                          int vendorCode)
构造一个带有给定 reasonSQLStatevendorCodeSQLNonTransientConnectionException 对象。 cause 没有初始化,随后可以调用 Throwable.initCause(java.lang.Throwable) 方法初始化。

参数:
reason - 对异常的描述
SQLState - 标识异常的 XOPEN 或 SQL:2003 代码
vendorCode - 特定于数据库供应商的异常代码
从以下版本开始:
1.6

SQLNonTransientConnectionException

public SQLNonTransientConnectionException(Throwable cause)
构造一个带有给定 causeSQLNonTransientConnectionException 对象。SQLState 初始化为 null,供应商代码初始化为 0。如果 cause==null,那么 reason 初始化为 null;如果 cause!=null,则初始化为 cause.toString()

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

SQLNonTransientConnectionException

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

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

SQLNonTransientConnectionException

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

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

SQLNonTransientConnectionException

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

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

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java 2 SDK SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策