or be declared volatile, which is what i think martin is doing... -igor
On Tue, Aug 9, 2011 at 12:45 PM, Dan Retzlaff <[email protected]> wrote: > That helps, but to be totally safe I think you still need to wrap > Application.metaData with a java.util.concurrent.atomic.AtomicReference. I'm > no JVM expert, but isn't this why AtomicReference exists? > > Note that Session syncs both get and set per > https://issues.apache.org/jira/browse/WICKET-3779. Maybe this should be > revisited too. > > On Tue, Aug 9, 2011 at 12:19 PM, Igor Vaynberg <[email protected]>wrote: > >> metadata writes are copy-on-write if they change the size of the array.... >> >> -igor >> >> On Tue, Aug 9, 2011 at 12:11 PM, Dan Retzlaff <[email protected]> wrote: >> > I don't see a trick. But I wonder if there will be performance impact to >> > synchronizing Application.getMetaData since it's used every time a >> Component >> > is instantiated with AOP. Disclaimer: I haven't done any Wicket load >> > testing, so I don't really know where the hotspots are. >> > >> > On Tue, Aug 9, 2011 at 11:55 AM, Martin Grigorov <[email protected] >> >wrote: >> > >> >> Hi, >> >> >> >> There are 2 getters (getMetaData and getPageManagerProvider) which are >> >> not synchronized but their setters are. >> >> Is there specific reason for that? What is the trick here ? >> >> >> >> -- >> >> Martin Grigorov >> >> jWeekend >> >> Training, Consulting, Development >> >> http://jWeekend.com >> >> >> > >> >
