Proxy Colocation Optimization

in Help Center
I think I'm having some trouble understanding when Ice chooses to use colocation optimization for proxies. I've created a quick sample program to test it:
When I run this with Ice.Trace.Network=2 it shows a tcp connection being made to the Object Adapter. I thought it wouldn't do this since I'm using a direct proxy that refers to an adapter in my own process. Is this not correct?
class Test(Ice.Locator): def findAdapterById_async(self, cb, id, current = None): cb.ice_response(None) id = Ice.stringToIdentity('blah') c = Ice.initialize(sys.argv) oa = c.createObjectAdapterWithEndpoints('test', 'tcp -h localhost') oa.add(Test(), id) oa.activate() prx = oa.createDirectProxy(id) prx = Ice.LocatorPrx.checkedCast(prx)
When I run this with Ice.Trace.Network=2 it shows a tcp connection being made to the Object Adapter. I thought it wouldn't do this since I'm using a direct proxy that refers to an adapter in my own process. Is this not correct?
0
Comments
Ice would use collocation optimization in your example if you were using C++, Java, or .NET, but collocation optimization is not currently supported in Python. It's not a limitation of the Ice extension, but rather a limitation in the Ice run time. Changing this situation is on our TODO list, but it's not a high priority at present.
Take care,
Mark