Reference: Connection factory JNDI name practices
Using the direct JNDI DataSource, jdbc/xxxxxx, at Hibernate 3.X on Websphere 6.X has wrong message below:
J2CA0294W: Deprecated usage of direct JNDI lookup of resource jdbc/mysqlds.
The following default values are used: [Resource-ref settings]
or
J2CA0294W: 已棄用 jdbc/mysqlds 資源的直接 JNDI 查閱。使用下列預設值:[Resource-ref settings]
1.Just use Resource-ref in web.xml,add the resource setting, like
<resource-ref id="ResourceRef_1268360344308">
<res-ref-name>jdbc/MySQL</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resRefBindings xmi:id="ResourceRefBinding_1268360344308" jndiName="java:/comp/env/jdbc/mysqlds">
</resRefBindings>
Then, the wrong message issue can be solved.

![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=9c70c5a2-82a3-44db-bd6b-6bf46e04626e)
