Why do I get "Resource reference could not be located" warning in WAS?

When using Coherence resource adapter in WebSphere Application Server you may see the following messages in the log:

ConnectionFac I J2CA0122I: Resource reference tangosol.coherenceTx could not be located, so default values of the following are used:

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)

To get rid of these messages you will need to add a resource reference to your web or ejb deployment descriptor:

  1. Add the following element to your web.xml (or ejb-jar.xml)
    <resource-ref id="ResourceRef_coherence">
        <res-type>com.tangosol.run.jca.CacheAdapter</r es-type>
  2. Add the following element to your ibm-web-bnd.xmi (or ibm-ejb-jar-bnd.xml)
    <resRefBindings xmi:id="ResourceRefBinding_coherenceTx" jndiName="tangosol.coherenceTx">
        <bindingResourceRef href="WEB-INF/web.xml#ResourceRef_coherenceTx"/>
  3. Add the following element to your ibm-web-ext.xmi (or ibm-ejb-jar-ext.xml)
    <resourceRefExtensions xmi:id="ResourceRefExtension_coherenceTx">
        <resourceRef href="WEB-INF/web.xml#ResourceRef_coherenceTx"/>