From: Jan B. <ja...@mo...> - 2004-12-23 05:05:02
|
-- Sorry if this is a duplicate, 3rd attempt at sending to the list -- Colin, Apologies for this late reply, but I have only just found out that SourceForge has not been forwarding me email since they did a site upgrade in early December! > I was looking at the code and when a webapplication (PlusWebAppContext) > initializes it sets up the environment through jndi... Is this writing to a > global jndi tree or to a local jndi for each application? I am guessing the > later else it would fall over if you had more than one web application? Each webapp has it's own java:comp/env space. > A few other points. > > 1. Shouldn't the JNDI be setup for each thread depending on the security subject > on that thread at that time? If so then does this happen later? The JNDI java:comp space is set up per webapp using the context class loader as the discriminator (because the class loader is unique per webapp). Some servlet containers instead adorn the service thread with info that allows access to the java:comp space for the particular webapp. > 2. This will only work for environments where the java:comp is not set to read > only (it would be nice if you could have the jndi setup abstracted so other > developers could setup the jndi context depending on their context factory) The java:comp namespace is only supposed to be readonly insofar as the associated webapp is concerned. JettyPlus is a little relaxed on this and actually allows a webapp to write to the context after it has been initialized. This could be tightened up. cheers Jan |