While the context.xml file under META-INF directory (either in the Tomcat installation or in user’s application) is used to map a JNDI name to the resource managed by Tomcat, in the WebLogic application server, it maps the JNDI to the resource in the weblogic.xml file under WEB-INF directory. In addition to the weblogic.xml file, user also needs to add a <resource-ref /> entry in web.xml file, and in Weblogic Admin Console to create a JDBC resource.
weblogic.xml
<resource-description> <jndi-name>applicationDs</jndi-name> <res-ref-name>jdbc/applicationDs </res-ref-name> </resource-description>
web.xml
<resource-ref> <description>My data source</description> <res-ref-name>jdbc/applicationDs </res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>
TTC-20140927-52650
Recommended Comments
There are no comments to display.