On Mon, Oct 25, 2010 at 12:25 PM, Phil Steitz <phil.ste...@gmail.com> wrote: > > I notice now what I missed on initial review of Simo's patch - the pool > accessors now manage the config properties via persisted Config members. I > am OK with this, but it now means that the Config classes have to be > mutable. What needs to be threadsafe, however, is the pool itself. Given > that you can't rely on Config locks to ensure correctness for the pool (i.e. > the pool-exposed mutators are still going to have to lock the pool itself), > making Config accessors synchronized is just adding extra synch. >
I haven't had a chance to review the proposed code changes yet, but why not just use a reconfigure(Config) method on the pool objects which is called by the constructor and by the outside world (including JMX stuff)? There are two options with this approach: 1. Make a copy of the Config object so that outside changes (if Config is left mutable) don't make an impact. 2. Don't refer directly to the Config object at all inside the pool's implementation. You'd have to copy the config information somewhere else obviously. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org