CBProp doesn't satisfy all the requirements of a Proxy for Transaction purposes. If it did, then CocoProxy could also be used with Transactions since it implements CBProp. Specifically, you need additional semantics for a Proxy interface. For example, accessors for the proxy's delegate object (e.g. setObject/getObject) so that the Transaction can copy the delegate's state when an object is bound to a Transaction. The Proxy interface should also derive from Cloneable or an equivalent so the proxy object's state can be copied along with the delegate's state. As an example, during our evaluation we have created a high performance proxy that doesn't look up data field and method objects on every setPropObjectData. To support this approach, we needed to store the map name in the proxy. The problem is that the map name is not copied with the proxy during a Transaction bind. To workaround the problem we had to derive from CocoProxyM and use the setKeyValue/getKeyValue methods of that class to pass the map name. A little strange, to say the least, but it worked. We're keeping our fingers crossed that we don't need the set/getKeyValue methods for their intended purpose. A proxy interface with delegate access and cloning ability would be a much better solution.
|