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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to