Indirect Proxy with Object Adapter Identifier
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
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 Syntax for Stringified Proxies.
For example:
Root@fsadapter # proxy to Root object hosted by object adapter fsadapter # two-way proxy by default
Root -o @ fsadapter # oneway proxyWhen 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:
Ice for JavaScript does not provide collocation optimization, so the resolution starts at step 2.
If collocation optimization is enabled (the default), Ice checks if an object adapter created by the proxy's communicator has the desired object adapter identifier (set through ReplicaGroupId or AdapterId). 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.