> 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).
One idea:
1. Create a custom Interceptor.
2. In preService and preInit, set a thread data object ( that can be
accessed from your InitialContext) ( of course, your interceptor will be
JDK1.2 specific )
There are other ways to do it, the problem is how to pass a parameter (
like the current context ) without passing it explicitely ( you don't have
"ServletContext" params in your InitialContext constructor ). The best way
you can do that is associating the object with the Thread ( since
getThread() is so easy to do ).
If you want JDK1.1 compat you could use a static Hashtable, keyed by
Thread and having as value the information you need ( current context ).
Please contribute the result back to tomcat :-)
Costin
>
> 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]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]