From: nico.hoogervorst@... (Nico Hoogervorst) Date: 2003-05-01T20:20:18+09:00 Subject: Re: [OO interface design] Pass-by reference VS encapsulation ? Brian Candler wrote in message news:<20030430212939.GB41345@uk.tiscali.com>... > I am not sure about allowing one contact object to be shared between two > addressbooks though. Any change to the contact would have to be 'agreed' by > both addressbooks, which sounds like a fairly complicated two-phase commit > to avoid getting into an inconsistent state. Not really complicated. Add Vetoable Change Support to the Contact class. The involved addressbooks register a Vetoable Change Listener at the contact objects. Whenever a contact is changed, all registrated listeners are allowed to vote about the change, and they can prevent that the change takes place.