What if the SimpleDateFormat variable is declared as final and/or static? Thanks,
Matt ----- Original Message ----- From: "Craig R. McClanahan" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Nifty Music" <[EMAIL PROTECTED]> Sent: Tuesday, December 23, 2003 2:35 PM Subject: RE: Example of a non-threadsafe Action? > Quoting Nifty Music <[EMAIL PROTECTED]>: > > > Thanks Craig! You certainly confirmed my suspicions, although I would have > > guessed that I could've gotten away with sharing the SimpleDateFormat > > variable since it wouldn't depend on any values coming in from request > > objects. Could you perhaps shed some light on why it wouldn't make sense to > > share it? > > > > Because the internal implementation of SimpleDateFormat uses instance variables > during parsing and formatting, so it's not thread safe :-). > > Craig > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]