避免使用已淘汰的 ConnectionFactory MBean 方法

此規則會標示使用的 ConnectionFactory MBean 的已淘汰方法名稱:

這些作業可在 ConnectionFactory MBean 上進行呼叫。

規則會掃描下列字串文字:"getPoolContents"、"getAllPoolContents" 和 "showAllocationHandleList"。 即使未在呼叫方法上使用這些字串,也會偵測到它們,因為名稱常數可能是在不同的公用程式類別中進行編碼的。

如果使用字串 "getPoolContents" 來呼叫 ConnectionFactory 方法,則可將其手動移轉至 "showPoolContents"。

如果使用字串 "getAllPoolContents" 來呼叫 ConnectionFactory 方法,則可將其手動移轉至 "showAllPoolContents"。

沒有適用於 showAllocationHandleList 的取代方法。

如果取得誤判結果,則可以使用「忽略結果」選項,防止相同的程式碼再次產生結果。

請參閱 ConnectionFactory MBean API 規格,以取得相關資訊。

已淘汰的特性 清單位於說明文件中。