On Sat, Jan 10, 2009 at 6:34 AM, cobracbh <[email protected]> wrote:
> But on the other hand, we could also use ThreadLocal pattern to share
> some data among multiple different method invocations.

It sounds like you want a public static member on a class somewhere.
Depending on whether you want to share data in a read-only fashion or
a read-write fashion, or a mix, with some call-sites allowed
read-write and other restricted to read-only, you may want a public
static final member variable, a public static member variable, a
public static getter method, or a public static getter paired with a
public static setter.

That's the long way of saying you want a global variable, and Java has
many ways to support that.  ThreadLocal support is not even close to
necessary for your use-case.

Ian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to