Webapp: safetly update a shared List/Map in the AppContext
- by al nik
I've Lists and Maps in my WebAppContext.
Most of the time these are only read by multiple Threads but sometimes there's the need to update or add some data.
I'm wondering what's the best way to do this without incurring in a ConcurrentModificationException.
I think that using CopyOnWriteArrayList I can achieve what I want in terms of - I do not…