Can anyone please provide me this information please..... Sorry for being persistent!!
I am still not clear why a URLStreamHandlerFactory is required for JNDI!!! I thought Context.lookup() is what the web-apps will do! Why would the web-apps want to use a new URL("jndi://...."); Where/why does tomcat have to use jndi URLs to fetch resources?? Can you please elaborate on "It is because Tomcat uses "jndi://..." for handling web application resources". Sriram. On Wed, Jan 16, 2013 at 1:50 PM, e e <dade...@gmail.com> wrote: > > Thanks for the response. I will move to Tomcat-7. > But, I am still not clear why a URLStreamHandlerFactory is required for > JNDI!!! > I thought Context.lookup() is what the web-apps will do! Why would the > web-apps want to use a new URL("jndi://...."); Where/why does tomcat have > to use jndi URLs to fetch resources?? > > Can you please elaborate on "It is because Tomcat uses "jndi://..." for > handling web application resources". > > Sriram. > > > > > On Wed, Jan 16, 2013 at 1:18 AM, Mark Thomas <ma...@apache.org> wrote: > >> On 15/01/2013 19:09, Christopher Schultz wrote: >> > Sriram, >> > >> > On 1/15/13 12:50 PM, e e wrote: >> >> [I a]m trying to understand why WebAppLoader does a >> >> URL.setURLStreamHandlerFactory(). >> > >> > Presumably, it's important to handle URLs in a custom way for web >> > applications. >> >> No. It is because Tomcat uses "jndi://..." for handling web >> application resources. >> >> >> I see that a protocol handler is being set for "jndi://" >> >> protocol. Our apps' do NOT use JNDI urls. I believe tomcat 6 has >> >> NOT used the jndi url anywhere in its codebase. >> >> Wrong. See above. >> >> > Tomcat includes a lightweight JNDI that can be used for things like >> > JDBC DataSources. So, if you configure a DataSource, your webapp >> > will be able to fetch it using JNDI. >> >> Irrelevant to this issue. >> >> >> What [features] in tomcat will get affected if I set my factory >> >> before tomcat sets it[?] ([note:] Factory can be set only once). >> >> - What [features] will I lose if I set my factory[?] >> >> Pretty much everything. >> >> >> - I cannot change the webapp's code to use the overloaded >> >> java.net.URL() which takes a URLStreamHandler as an argument. >> >> (Will require code changes across 50 applications) - I cannot >> >> set the "*java.protocol.handler.pkgs*" as these classes must be >> >> present in the system classpath. (Classloader hierarchy of our >> >> app-server makes it difficult) (We run tomcat as one of the >> >> components in our server) (Similar to any j2ee server) >> >> You need to use Tomcat 7. >> See https://issues.apache.org/bugzilla/show_bug.cgi?id=26701 >> >> Mark >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >