JNDI path for JDBC data sources?

Sometimes I see JDBC data sources specified in JNDI that use the "jdbc" path. For example, the following (for Tomcat6):

<Resource name="jdbc/myAppDS" auth="Container" type="javax.sql.DataSource"
       ..... />

But sometimes I see this without "jdbc" in the JNDI path name. Does jdbc use only convention? Is this typical? Where are these documents documented?

+3
source share
1 answer

This is just an agreement. You can call the resource as you like, but if you have many resources defined in your context, using the standard prefix makes it easy to determine which resource it actually has.

JavaBean bean/, Mail mail/.

+3

Source: https://habr.com/ru/post/1777481/


All Articles