[jboss-user] [JNDI and Naming] - Re: What is the exact correct way to make JBoss datasource J
do-not-reply at jboss.com
Mon Oct 5 09:11:08 EDT 2009
anonymous wrote : Above example, could someone advises me why I have to add
| to make this config works?
The use-java-context setting determines where in the jndi tree the name appears. If this is true (the default), the the full name is "java:/jdbc/esoafds". If the value is false then the full name is "jdbc/esoafds".
Only apps deployed into the application server can see names in the "java:" context, so if you are using a remote client to access a name, it cannot appear there. Thus you need use-java-context set to false.
In you second example, the web.xml, in combination with the jboss-web.xml, is saying that any time the app requests the name "jdbc/esoafds" to actually look at "java:jdbc/esoafds". But your ap is a Spring app and you are telling it the wrong name - try "jdbc/esoafds" instead.
Disclaimer: its been years since I used Spring and I don't know what funny things it does with JNDI names when looking things up, so you might have to play around with the names for a while. Also, you should use jNDIView to see what names you really have.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258656#4258656
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258656
More information about the jboss-user