A proxy with an object adapter identifier (@adapterId
in stringified form) is a form of indirect proxy. Such a proxy consists of an object identity, an object adapter identifier and (optionally) proxy options such as -t (for two-way proxies), as described on Proxy and Endpoint Syntax.
For example:
Root@fsadapter # proxy to Root object hosted by object adapter fsadapter (two-way proxy by default) Root@fsadapter -o # oneway proxy
When you invoke an operation on such an indirect proxy, Ice first resolves the object adapter identifier–Ice checks if it corresponds to a local object adapter, or retrieves the endpoints published by this object adapter.
The resolution proceeds as follows:
- If collocation optimization is enabled (the default), Ice checks if an object adapter associated with the same communicator as the proxy has the desired object adapter identifier (set through
ReplicaGroupId
orAdapterId
). If there is such an object adapter, Ice then sends requests to this object adapter using collocation optimization. The holding state of the object adapters is ignored for this search and subsequent collocated dispatches. - Otherwise, if no local object adapters carries the desired object adapter identifier (or collocation optimization is disabled), and a locator is configured with the communicator:
- Ice looks up this object adapter identifier in its locator cache.
- If this lookup fails, Ice resolves this object adapter identifier using the locator.
- In case the preceding steps can't locate the object adapter, the invocation fails with
NoEndpointException
.