instead of repeating
the same code over and over again, neh?
--- Pat
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> work.org]
> Sent: Thursday, June 02, 2005 7:20 AM
> To: Tapestry users
> Subject: Re: ThreadLocal example please!
&
Tapestry users
> Betreff: Re: ThreadLocal example please!
> Datum: Thu, 02 Jun 2005 15:07:56 +0300
>
> Why can't you use a custom Global object and
> initialize the map in its constructor (will only get invoked once)
> ???
>
>
> [EMAIL PROTECTED] wrote:
>
go through the HashMap hundreds
of timesI am looking for an easy way to "remember" the language and for
instance domain/group specific data
--- Ursprüngliche Nachricht ---
Von: "Patrick Casey" <[EMAIL PROTECTED]>
An: "'Tapestry users'"
Betref
/group specific data
> --- Ursprüngliche Nachricht ---
> Von: "Patrick Casey" <[EMAIL PROTECTED]>
> An: "'Tapestry users'"
> Betreff: RE: ThreadLocal example please!
> Datum: Wed, 1 Jun 2005 11:15:13 -0700
>
>
> Public static final fAL
day, June 01, 2005 11:03 AM
> To: Pablo Ruggia
> Cc: tapestry-user@jakarta.apache.org
> Subject: Re: ThreadLocal example please!
>
> Thank you! The problem however is the following.
>
> Assuming I have 30,000 members online at the same time,
> 10,000 belong to group
data and 90 Mbytes where every single member of the 10,000
people keeps copy of its group data.
Do you know what I mean ?
Sarah
> --- Ursprüngliche Nachricht ---
> Von: Pablo Ruggia <[EMAIL PROTECTED]>
> An: Tapestry users
> Betreff: Re: ThreadLocal example please!
> Datum
Yes, it's possible.
Personally, I put this logic in setupForRequest method of my engine.
I created a class, UserContext, like this:
public class UserContext {
static ThreadLocal _visitLocal = new ThreadLocal();
public static Object getVisit() {
return (Visit) _visitLocal.get();
...
> --- Ursprüngliche Nachricht ---
> Von: "Hensley, Richard" <[EMAIL PROTECTED]>
> An: "Tapestry users"
> Betreff: RE: ThreadLocal example please!
> Datum: Tue, 31 May 2005 13:19:35 -0400
>
> Sarah,
>
> Do you have a Visit?
>
> This sounds like se
Sarah,
Do you have a Visit?
This sounds like session specific information that is normally stored in the
Visit. I would consider constructing a method in my Visit that knows how to
navigate the global object correctly.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]