Re: AW: AW: AW: Struts 1 and thread safety

2010-09-19 Thread Chris Mawata
s, Norbert -Ursprüngliche Nachricht- Von: Chris Mawata [mailto:chris_mawata_str...@mathcove.net] Gesendet: Sonntag, 19. September 2010 01:20 An: Struts Users Mailing List Betreff: Re: AW: AW: Struts 1 and thread safety On 9/18/2010 8:36 AM, Norbert Hirneisen wrote: Just another question regarding th

AW: AW: AW: Struts 1 and thread safety

2010-09-19 Thread Norbert Hirneisen
(); -- Something wrong with that approach ? Thanks in advance, Norbert > -Ursprüngliche Nachricht- > Von: Norbert Hirneisen [mailto:no...@s2you.de] > Gesendet: Sonntag, 19. September 2010 09:42 > An: 'Struts Users Mailing List' > Betreff: AW: AW: AW: Struts 1 and thread

AW: AW: AW: Struts 1 and thread safety

2010-09-19 Thread Norbert Hirneisen
cht- > Von: Chris Mawata [mailto:chris_mawata_str...@mathcove.net] > Gesendet: Sonntag, 19. September 2010 01:20 > An: Struts Users Mailing List > Betreff: Re: AW: AW: Struts 1 and thread safety > > > On 9/18/2010 8:36 AM, Norbert Hirneisen wrote: > > Just another q

Re: AW: AW: Struts 1 and thread safety

2010-09-18 Thread Chris Mawata
On 9/18/2010 8:36 AM, Norbert Hirneisen wrote: Just another question regarding this context: the original code has been written by a colleague. Now I´m intrigued if setting the execute-Method in the base class within a synchronized block makes sense ?! As far as I´m understanding the action cla

AW: AW: Struts 1 and thread safety

2010-09-18 Thread Norbert Hirneisen
Just another question regarding this context: the original code has been written by a colleague. Now I´m intrigued if setting the execute-Method in the base class within a synchronized block makes sense ?! As far as I´m understanding the action classes behave like servlets and multiple request c

AW: AW: Struts 1 and thread safety

2010-09-18 Thread Norbert Hirneisen
Thanks for the hint to ThreadLocals. I´m using the projectId in the subclassed action classes to identify a project, generate project-related URLs and to query the database for project-related data. I´m needing the projectId in nearly every subclassed action. It would be very convenient to retr

AW: AW: Struts 1 and thread safety

2010-09-18 Thread Norbert Hirneisen
Thanks, Dave. Using the data local means to call long projectId = Project.getIdFromRequest(request); in every subclass because there is no thread-safe way to use a class field in the super-class ? Would it be thread-safe to use a local variable in the super-class and store the data in the sess