Do not use JBoss-specific naming lookup strings

This rule flags the use of JBoss proprietary naming lookup strings that start with "java:". This includes "java:jboss", "java:jdbc", as well as simply "java:" or "java:/" since the content afterwards might contain JBoss-specific values.

For example, refer to the following lines:
ds = (DataSource) ctx.lookup("java:" + getLookupName());
ds = (DataSource) ctx.lookup("java:jboss/Test");
ds = (DataSource) ctx.lookup("java:global");

The rule will flag "java:" and "java:jboss/Test", but not "java:global". While the "java:" string will be flagged, it might not need to be migrated. In the preceding example, check the value returned by getLookupName() to determine if the lookup name should change. If the name returned is a reference that is defined in the java:comp/env namespace, you can just remove the "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".

For more information, refer to Troubleshooting namespace problems.