Home Help Center

IceGrid/Query

mwilsonmwilson Member Mark WilsonOrganization: Integrated Computer Solutions, Inc.Project: TBD ✭✭✭
Hello,

I'm trying to find an object with the IceGrid/Query interface. I have added an object with ID "[email protected]"; this works fine when I get a proxy to it via the communicator, but when I do findObjectById, I get a null proxy back. Not sure what I'm doing wrong...
IceGrid::QueryPrx qPrx =IceGrid::QueryPrx::checkedCast(basePrx);
if ( qPrx )
    printf("qPrx okay\n");
Ice::ObjectPrx found = qPrx->findObjectById(
        communicator()->
            stringToIdentity("[email protected]"));

Thanks.

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    "[email protected]" is an indirect proxy in string form, not an identity. The identity is simply "DataRecorder".
  • mwilsonmwilson Member Mark WilsonOrganization: Integrated Computer Solutions, Inc.Project: TBD ✭✭✭
    The server registers the object as "DataRecorder" on object adapter "DataRecorderSvcAdapter". I tried find... on "DataRecorder", still got back null.

    The new code snippet is:
    Ice::ObjectPrx found = qPrx->findObjectById(
            communicator()->
                stringToIdentity("DataRecorder"));
    
  • mwilsonmwilson Member Mark WilsonOrganization: Integrated Computer Solutions, Inc.Project: TBD ✭✭✭
    Ah, is the problem that I didn't start the server on an icegridnode?
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    The findObjectById operation can only be used to find well-known objects. Have you configured IceGrid so that DataRecorder is a well-known object?

    Take care,
    - Mark
Sign In or Register to comment.