JNDI Setting of Hibernate on Websphere 6.x

| No TrackBacks

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>

2. Add below in ibm-web-bnd.xmi,

  <resRefBindings xmi:id="ResourceRefBinding_1268360344308" jndiName="java:/comp/env/jdbc/mysqlds">
    web.xml#ResourceRef_1268360344308"/>
  </resRefBindings>

Then, the wrong message issue can be solved.

Reblog this post [with Zemanta]

No TrackBacks

TrackBack URL: http://server.everfine.com.tw/blog/mt-tb.cgi/288

August 2010

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Archives

Powered by Movable Type 4.34-en

About this Entry

This page contains a single entry by philipz published on March 21, 2010 10:25 AM.

IBM DB2 UDB for z/OS Version 8 ROW_NUMBER() solution was the previous entry in this blog.

Using JNative call dll is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.