虽然 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,那么要迁移 ConnectionWaitTImeoutException,可以使用 JDBC 提供的异常 java.sql.SQLTransientConnectionException。请参阅 com.ibm.websphere.ce.cm.ConnectionWaitTimeoutException 以获取更多信息。
有关在 Liberty 上不受支持的其他 API 和 SPI 的信息,请参阅某些 API 和 SPI 在 Liberty 上不可用。