雖然 WebSphere 一般異常狀況 API (com.ibm.websphere.ce.cm) 在 Liberty 中通常無法使用,但
com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException 類別已在 WebSphere Liberty 20.0.0.9 中公開為 API。如果要使用
ConnectionWaitTimeoutException 類別,請確定您使用的是 WebSphere Liberty 20.0.0.9 或更新版本且已配置
heritageAPIs-1.0 特性。heritageAPIs-1.0 特性在 Open Liberty 中無法使用。
對於 Open Liberty,或者如果您不想使用繼承 API,則您可以使用 JDBC 提供的異常狀況
java.sql.SQLTransientConnectionException 來移轉 ConnectionWaitTImeoutException。如需相關資訊,請參閱
com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException。
如需 Liberty 中不支援的其他 API 及 SPI 相關資訊,請參閱在 Liberty 中無法使用部分 API 及 SPI。