此規則會標示使用的以 "java:" 開頭的 JBoss 專有命名查閱字串。
這包括 "java:jboss"、"java:jdbc" 以及僅 "java:" 或 "java:/",因為後面的內容可能包含 JBoss 專用值。
該規則將標示 "java:" and
"java:jboss/Test", but not
"java:global". While the
"java:" 字串時,可能不需要進行移轉
。 In the preceding example, check the value returned by getLookupName()
to determine if the lookup name should change. 如果傳回的名稱是 java:comp/env 名稱空間中定義的參照
,則您只需移除 "java:" string.
Refer to Lookup names support in deployment descriptors and thin clients for a list of valid JNDI lookup values. This includes "java:global", "java:app"、"java:comp", and "java:module".
如需相關資訊,請參閱名稱空間問題疑難排解。