avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: AW: AW: Jo! on Phoenix
Date Tue, 06 Nov 2001 05:17:06 GMT
On Mon, 5 Nov 2001 02:11, Hendrik Schreiber wrote:
> > It would be much nicer if there was one version of license(s) in
> > project and
> > each source file had a small pointer to them.
>
> well, I guess you are right... but on the other hand I am using this really
> slick ide IDEA by intellij (http://www.intellij.com) that automatically
> shows me the beginning of the source code whenever I open a java file...
> BTW: I am not affiliated with intellij, but IDEA is the best ide I have
> seen in a loooong time :-)

agreed. I just converted my company from using 8 different editors to using 
just this one editor. All in under two hours. It is the fastyest I have seen 
them change their minds about anything ! ;)

> > You will want to create a MemoryContext per web application and
> > populate it
> > with all the things appropriate.  Then you will have to create an
> > InitialContextFactory. This factory would get the base context for the
> > current web application (usually stored in a ThreadLocal variable). After
> > that it *should* work ;)
>
> OK - I did a bit of reading today and my understanding of the matter is the
> following:
>
> o To support the url "java:" a javaURLContextFactory needs to be written.
> see section 3.2.2 of the current spec (jndispi.pdf)

right. The naming toolkit in excalibur I mentioned, has an 
AbstractURLContextFactory that should make this easy.

> o To support different environments per war (this is a necessity), the
> context "comp" needs to have an ObjectFactory that returns different
> subcontexts depending on the contextclassloader of the calling thread. This
> is necessary because different wars are executed by a set of threads. There
> is no war-to-thread one-to-one relationship. This also means that
> ThreadLocal does not work. However a war has always a distinct Classloader
> that can be used to identify the calling war.

ContextClassLoaders are just thread locals (InheritableThreadLocals to be 
precise) so ThreadLocals should work for JNDI context factory. You just have 
to make sure that everywhere that the ContextClassLoader is set, so is the 
JNDI context.

> o The comp context needs to be bound at some point. When?

everywhere ContextClassLoader is set (essentially before any method of .war 
is claeed).

-- 
Cheers,

Pete

*------------------------------------------------------*
| "Common sense is the collection of prejudices        |
|  acquired by age 18. " -Albert Einstein              |
*------------------------------------------------------*

--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message