|
From: <jue...@we...> - 2004-04-13 10:32:43
|
Of course, you're right that the synchronized block should include the = return statement - thanks for spotting this. The synchronization there = isn't terribly important though, as it's just about unnecessarily = re-fetching the bean from the application context. The only reason for the delegateAction member attribute is speed: to = avoid repeated lookups of the Action bean in the Spring application = context. It might be worth benchmarking whether the synchronized block = isn't the bigger performance threat here, though, as the context.getBean = call boils down to a HashMap lookup. It's a pity that Struts doesn't pass in the ActionMapping in some Action = initialization callback. As far as I can tell, the mapping is determined = at Action initialization time, so this would have been feasible. If we = had such a callback, we could simply fetch the delegate Action at = initialization time, completely avoiding the need for synchronization. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Dirk Markert Sent: Tuesday, April 13, 2004 10:54 AM To: j=FCrgen h=F6ller [werk3AT] Subject: Re[2]: [Springframework-developer] Struts Spring Plugin Hello J=FCrgen, I just had a look at the implementation of DelegatingActionProxy. I wonder why you are using a membar attribute delegateAction. The class = has to be thread safe, and I thing using this attribute it isn't. In = getDelegateAction your synchronized access does not include the return statement. Do I miss something? Best regards, Dirk ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |