Archived

This forum has been archived. Please start a new discussion on GitHub.

Preserving proxy options from Locator

I've created a custom Locator and I'm not quite understanding the relationship between what the Locator returns and what the caller actually receives. Specifically, any proxy options I set in the Locator (such as endpointSelection) don't seem to be preserved in the proxy that actually makes it to the caller.

For instance, if my application does something like this:
pxy = MyPrx.checkedCast(comm.stringToProxy('dummy@Ordered-endpoints'))

my Locator prints the value of the proxy's endpointSelection immediately before returing from findAdapterById and it is correctly set to Ordered. But the resultant proxy of the code above has Random endpointSelection, despite what the Locator had set.

Is this the normal behaviour or am I doing something wrong? If this is the normal behaviour, is there any way that I can force the proxy options to be preserved?

Comments

  • benoit
    benoit Rennes, France
    Hi Tim,

    Note that there's 2 kind of proxy options: local and non-local proxy options. Local proxy options are never marshalled with the proxy. Non-local proxy options are the ones that can be specified in a stringified proxy (see D.1 Proxies). Local proxy options are the ones which can be configured through properties (see C.8 Ice Proxy Properties).

    In any case, the Ice runtime only uses the endpoints of the proxy returned by the Ice::Locator operations, it doesn't override the indirect proxy options with the ones from the proxy retrieved by the locator. There's no way to force the proxy options to be preserved.

    Cheers,
    Benoit.