after discussing a few scenarios I came upon the idea of
volatile is to be used as a default declarator (if only for speed..)
ThreadLocal is to be used for complex DataObjects whose size may 'grow' over
time
in this way ThreadLocal guarantees proper initialisation of the entire
object
Lighter (primarily primitive such as int,double) objects may live in memory
as volatile
Thanks Dave--
Martin Gainty
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and Sender
does not endorse distribution to any party other than intended recipient.
Sender does not necessarily endorse content contained within this
transmission.
--- Martin Gainty <[EMAIL PROTECTED]> wrote:
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Valentines Day -- Shop for gifts that spell L-O-V-E at MSN Shopping
http://shopping.msn.com/content/shp/?ctId=8323,ptnrid=37,ptnrdata=24095&tcode=wlmtagline
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]