tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Zago" <>
Subject JNDI Initial Context, outside webapp
Date Wed, 09 Oct 2002 18:19:18 GMT
I noticed that is pratically impossible to retrieve a JNDI resource
outside a webapp.If I need to access my resourse in some classes
istantiated outside a single webapp, I always get an exception.

Name jdbc/myDS is not bound in this Context

I read the docs. If I understand well, the initialContext is read-only,
(for this reason I cannot published a resource there), then the only
context available is "java:comp/env", available only insdie a webapp.
I think that a solution could be: since initialContext for sure is
initialized before webapps, if I can publish a resource there, then I
can access this resource outside a webapp. have I understood well, is it
so impossible to publish in the initialContext, like in other
Application servers?
is there a way to access a JNDI resource outside a webapp?
or is it a limitation of the JNDI implementation in Tomcat?

Thank you in advance for suggestions or explanation.

Luca Zago
Senior IT Developer

E-TREE S.p.a.  Via Fonderia 43 - 31100 Treviso (Italy)
phone +39.0422.3107
fax   +39.0422.310888

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message