This content has been marked as final.
Show 3 replies
-
1. Re: datasource
waynebaylor Aug 15, 2007 3:09 PM (in response to zhlu)instead of "java:mcv_test" try "java:/mcv_test"
-
2. Re: datasource
zhlu Aug 15, 2007 3:27 PM (in response to zhlu)it didn't work either.
here is new app/WEB-INF/jboss-web.xml:
<jboss-web>
<resource-ref>
<res-ref-name>mcv_test</res-ref-name>
<jndi-name>java:/mcv_test</jndi-name>
</resource-ref>
</jboss-web>
-Henry -
3. Re: datasource
waynebaylor Aug 15, 2007 5:34 PM (in response to zhlu)on second thought, when you deploy the oracle-ds.xml JBoss will create the jndi entry for mcv_test. so you should be able to look it up without any resource-ref tags in your xml files.
for example:
my oracle-ds.xml<jndi-name>OracleDS</jndi-name> <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>
and i can look it up with:DataSource ds = (DataSource)new InitialContext().lookup("java:/OracleDS");
and i have no resource-ref tags in web.xml or jboss-web.xml.