[jboss-user] [JNDI and Naming] - Re: Why datasource JNDI name has to start with 'java:/' or 'java:jboss/ in AS 7.1
blake ong
do-not-reply at jboss.com
Thu Aug 15 06:03:47 EDT 2013
blake ong [https://community.jboss.org/people/blake] created the discussion
"Re: Why datasource JNDI name has to start with 'java:/' or 'java:jboss/ in AS 7.1"
To view the discussion, visit: https://community.jboss.org/message/832744#832744
--------------------------------------------------------------
Our development team uses maven jetty plugin for our local environment, and our production uses JBoss EAP 6.1
All you need to do is to create a jboss-web.xml in your WEB-INF with something like below:
<resource-ref>
<res-ref-name>jdbc/MyDS</res-ref-name>
<jndi-name>java:jboss/jdbc/MyDS</jndi-name>
</resource-ref>
In our web.xml we have something like this:
<resource-ref>
<res-ref-name>jdbc/MyDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/832744#832744]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130815/b662fe5a/attachment-0001.html
More information about the jboss-user
mailing list