[jboss-user] [JNDI/Naming/Network] - Re: Oracle Datasource not bound to JNDI
visolvejboss
do-not-reply at jboss.com
Tue Dec 12 05:52:39 EST 2006
Hello,
Modify your program as given below.
session bean
InitialContext ctx = new InitialContext();
| DataSource ds = (DataSource)ctx.lookup("java:/OracleDS");
| Connection conn = ds.getConnection();
jboss.xml
<resource-ref>
| <res-ref-name>java:OracleDS</res-ref-name>
| <res-type>javax.sql.DataSource</res-type>
| <jndi-name>java:/OracleDS</jndi-name>
| </resource-ref>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993014#3993014
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993014
More information about the jboss-user
mailing list