Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: volatile vs ThreadLocal

Dave Newton

2007-02-09

Replies:

--- Martin Gainty <mgainty@(protected):
> In a StrutsApplication is it best to use delcare
> variables with volatile OR ThreadLocal to ensure
> variables are referenced in a ThreadSafe manner?

Which variables, and what types?! (Note mild alarm.)
Are you attempting to share data, or ensure that it
*isn't* shared? Where are you accessing the variable?

d.




____________________________________________________________________________________
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.