偵測 global-transaction 元素的不正確屬性

此規則會標示 ibm-ejb-jar-ext.xml 檔中 global-transaction 元素的 transaction-timeout 屬性。

此屬性未正確記載於 說明文件中。 當它本該是 transaction-time-out 時,它被列為 transaction-timeout。 WebSphere 預期此屬性是 transaction-time-out。 使用缺少 '-' 之 transaction-timeout 屬性的應用程式將無法部署在 WebSphere 7.0 版以及更新版本中。

當從 6.1 版移轉時,會標示含有下列內容的 ibm-ejb-jar-ext.xml 檔:

<?xml version="1.0" encoding="UTF-8"?>
...
<session name="SomeSession">
<global-transaction transaction-timeout="15"/>
...
</session>
...

transaction-timeout 屬性必須修改為 transaction-time-out。 自動修正將修改檔案,如下例中粗體所示:

<?xml version="1.0" encoding="UTF-8"?>
...
<session name="SomeSession">
<global-transaction 交易逾時="15"/>
...
</session>
...