geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From govinda <>
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?

View this message in context:
Sent from the Apache Geronimo - Dev mailing list archive at

View raw message