Indirect Proxy with Adapter ID
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 adapter ID (@adapterId in stringified form) is a form of indirect proxy. Such a proxy consists of an object identity, an adapter ID 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 adapter ID–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 adapter ID (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 adapter carries the desired adapter ID (or collocation optimization is disabled), and a locator is configured with the communicator:
- Ice looks up this adapter ID in its locator cache.
- If this lookup fails, Ice resolves this adapter ID using the locator.
In case the preceding steps can't locate the object adapter, the invocation fails with
NoEndpointException.