This content has been marked as final.
Show 2 replies
-
1. Re: ANSWER: JNDI and Datasource and EJB issue
stefano_fornari Feb 11, 2003 8:57 AM (in response to qjack)This is Cool!
But still I have one doubt: as per J2EE specification, I should be able to look up a datasource like this:
Context ctx = new InitialContext();
DataSource ds =
(DataSource)ctx.lookup("jdbc/OneSourceMainDB");
Connection conn = ds.getConnection();
Which I am not able to with JBoss 3.0.6.
Any advice?
Thanks in advance.
Stefano -
2. Re: ANSWER: JNDI and Datasource and EJB issue
cimetgiu Feb 11, 2003 9:36 AM (in response to qjack)thank you for the example,
can I ask you another question:
how I had to configure my oracle-service.xml?
It's right that I had to copy it into deploy directory?
and that's all I have to do for connecting to db?
If I want to read a table of db, what I have to write in
my EJB?
Thanks and scuse me for the questions.