Use WebSphere bindings to define resource reference names

The JBoss deployment descriptors, jboss-web.xml and the jboss.xml file, might contain resource references. These references map the resource reference to the JNDI name, as demonstrated in the example. For the references to work correctly on WebSphere(R) Application Server, they must be moved to the WebSphere Application Server bindings files.

As defined in the JBoss DTD, the <resource-ref> tag can contain three different tags following the <res-ref-name> tag:

<!ELEMENT resource-ref (res-ref-name , (resource-name | jndi-name | res-url))>

This rule handles the <jndi-name> case. See the rule, Manually migrate resource references for URLS and resource managers, for the other types. The automated fix will take the resource references defined in JBoss-specific deployment descriptors and migrates them to WebSphere traditional and Liberty bindings.

jboss-web.xml constructs
<jboss-web>
<reference-ref>
<res-ref-name>test/Mail</res-ref-name>
<jndi-name>java:Mail</jndi-name>
</reference-ref>


jboss.xml constructs
<jboss>
<enterprise-beans>
<session>
<ejb-name>myBean</ejb-name>
<resource-ref>
<res-ref-name>test/Mail</res-ref-name>
<jndi-name>java:Mail</jndi-name>
</resource-ref>
</session>
</enterprise-beans>