geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From govinda <baskar.govi...@gmail.com>
Subject JNDI context
Date Mon, 04 May 2009 15:19:47 GMT

How do I connect to a datasource thru code without context "java:comp/env"

Context envContext  = (Context)initContext.lookup("java:comp/env");

I just want to connect to DB like this

DataSource ds = (DataSource)initContext.lookup("jdbc/LiferayPool");

Is it possible, if so where do I specify java jndi context ("java:comp/env")
outside the code?

Thanks
-- 
View this message in context: http://www.nabble.com/JNDI-context-tp23370580s134p23370580.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Mime
View raw message