Hi all... So we're keeping some config information CompositeConfiguration object, and we need to get subsets of this configuration data.
When I call .subset(...), and then do some checks on the subset (isEmpty(), etc.), I sometimes get ConcurrentModificationExceptions. I'm not sure what's modifying the underlying configuration, although we do have occasional setting of configuration values throughout the running of our app. What would be *ideal* would be to: 1. NOT have to synchronize every access to the configuration object, since we have a high-volume application 2. To allow read and write operations to happen to the configuration object without worrying about ConcurrentModificationExceptions 3. To be able to call .subset(...) on the configuration object and 1) not risk a ConcurrentModificationException during this operation, and 2) get a COPY of the subset back, so that further operations on the subset don't risk ConcurrentModificationExceptions Does anyone know of a way to do this? Or is the ONLY way to guarantee lack of CMEs to synchronize EVERY access (reads, writes, subsets, iterations, etc.)? If this is the case, how have others dealt with situations like ours, where you do mostly just reads on a Configuration object, but very occasional writes, and need to take subsets, and need to avoid exceptions while doing this? With a high volume app, synchronizing every access would slow things waaaaaay down, thus my question. - Tim -- Tim Bessie Meez, Inc. [email protected]
