Home Help Center

getting server-properties directly from IceGrid

thomasthomas Member Thomas HentschelOrganization: Technical University of MunichProject: intelligent information distribution system
How to get directly the server-properties (those you can define in your application.xml for instance) of a registered server in IceGrid without contacting the server itself?

I've got an server-template in my application.xml which is used to create server-instances at runtime with activation set to "on-demand". Some servers shut down if there is no current work to do.

My problem is that another process needs some properties of all servers of a given type and I dont want to start all "sleeping" servers to get their properties. I've seen that the IceGridGui is able to list all properties even of server which are shut down.

I have not found any hint in the documentation but I guess that my needed information is lying in the ServerInfos oder ServerDescriptor (IceGridGUI is showing the properties in the server-view) which I can get from IceGrid::Admin but both seem not to contain my needed piece of information.

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Thomas,

    Did you try getting the server info using the IceGrid::Admin::getServerInfo method and you lookup for the properties in the propertySet attribute of the server descriptor contained in the server info structure? The properties here are the effective properties of the server (they should be the same as the one showed by the "icegridadmin server describe" command).

    Cheers,
    Benoit.
  • thomasthomas Member Thomas HentschelOrganization: Technical University of MunichProject: intelligent information distribution system
    thanks for your reply. I have not seen that the command-line-tool is also able to get the properties. I will have a look at the implementation of the command-line-tool.

    But I am still confused: I am able to get the ServerDescriptor from the ServerInfo which i get from IceGrid::Admin but in the documentation of the ServerDescriptor there is no properties-member.
    The ServerInstanceDescriptor contains a propertySet but not the ServerDescriptor.

    I will have a look at the implementation of the command-line-tool first and will post if my problem is solved then.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Yes, the propertySet attribute is an attribute of CommunicatorDescriptor which ServerDescriptor inherits from.

    Cheers,
    Benoit.
  • thomasthomas Member Thomas HentschelOrganization: Technical University of MunichProject: intelligent information distribution system
    ahh, the propertySet is inherited. I always thought that it is a struct like the ServerInstanceDescriptor and have never thought that there can be derived values ...
    Thanks for your answer.
Sign In or Register to comment.