This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: multiple top-level environments (one per ServletContext)


At 08:21 PM 3/28/2001 -0800, Per Bothner wrote:
>Well, we need some way to find the "current" top-level environment.
>You don't want to do that globally, which leaves two alternatives:
>(1) per-thread, which means having some kind of thread-to-Environment
>mapping.
>
>The current approach is (1).  It can be generalized to arbitrary Threads,
>not just sub-classes of Future, presumably by using some kind of hash
>table.  There are performance costs to this, plus there may be some
>resorce reclaimation issues (you want to remove the thread entry from
>the table when the tread dies).  Using an interface instead of Future
>may be reasonable, but it doesn't change the general idea.

Couldn't you use java.lang.ThreadLocal?

David Chase
chase@naturalbridge.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]