[jboss-user] [JNDI/Naming/Network] - Re: lookup database source weird problem
jaikiran
do-not-reply at jboss.com
Fri May 4 11:13:10 EDT 2007
anonymous wrote : oracleDS = (javax.sql.DataSource) initialContext.lookup("jdbc/OracleDS");
This should be
oracleDS = (javax.sql.DataSource) initialContext.lookup("java:comp/env/jdbc/OracleDS");
Also,
anonymous wrote :
| <resource-ref>
| <res-ref-name>jdbc/OracleDS</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <jndi-name>jdbc/OracleDS</jndi-name>
| </resource-ref>
The jndi-name here doesnt look right to me. Most of the times it is java:/OracleDS. So try using the following:
<resource-ref>
| <res-ref-name>jdbc/OracleDS</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <jndi-name>java:/OracleDS</jndi-name>
| </resource-ref>
|
If that doesnt work, post the error message that you are seeing and also the *-ds.xml file which you are using for configuring the datasource
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043245#4043245
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043245
More information about the jboss-user
mailing list