[jboss-user] [EJB/JBoss] - Re: getting datasource jndi?
ramujava1
do-not-reply at jboss.com
Mon Dec 29 20:54:35 EST 2008
"jaikiran" wrote : You will first have to lookup the datasource using the JNDI API. Then you can call the getConnection API on the DataSource. Just an example:
|
| | DataSource ds = (DataSource) new InitialContext().lookup("java:myDS");
| | ds.getConnection();
i wrote the database connection in oracle-ds.xml file and placed in deploy folder and DataSource ds = (DataSource) new InitialContext().lookup("java:myDS");
ds.getConnection();
but i didn't get the connection what should i do?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198842#4198842
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198842
More information about the jboss-user
mailing list