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

ObjectAdapter.getLocator() gone in 1.4?

Tried to compile our source with 1.4 and could not because it seems that ObjectAdapter::getLocator() no longer exists in the code and has been taken out of the manual as well. The CHANGES file in the installation only says that this method was added under the section, "Changes since version 1.2.0", but says nothing about it being taken out.

What should we do?




  • benoit
    benoit Rennes, France
    You can get it from the configuration:
      Ice::PropertiesPtr properties = communicator->getProperties();
      string proxy = properties->getProperty("Ice.Default.Locator");
      Ice::LocatorPrx locator = LocatorPrx::uncheckedCast(communicator->stringToProxy(proxy));

    Out of curiosity, why do you need the locator proxy? If you need it to lookup objects by identity, I would recomend to use the IcePack::Query interface instead.