tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roytman, Alex" <roytm...@peacetech.com>
Subject Tomcat & JNDI
Date Tue, 07 Nov 2000 00:03:14 GMT
I am trying to tie Tomcat with JNDI to use J2EE pattern to obtain resources:

Context context = new InitialContext();
dataSource = (DataSource)context.lookup("java:comp/env/jdbc/myDataSource");

(I know Tomcat team is planning to have it for Tomcat 4 eventually)

I have my own little in memory JNDI implementation with support for
java:comp URLs
and it works fine but provides one global JNDI for all contexts defined in
server.xml while it should be context specific. Basically the problem is how
to make InitialContext() tomcat context aware (to be precise to make my
java:comp namespace to start from different roots depending on where
InitialContext was created). 

If AdaptiveClassLoader had some context info in it I could get it from there
while creating InitialContext.


Any ideas are greatly appreciated

Alex

Mime
View raw message