Archived

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

getting server-properties directly from IceGrid

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

  • benoit
    benoit Rennes, France
    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.
  • 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.
  • benoit
    benoit Rennes, France
    Yes, the propertySet attribute is an attribute of CommunicatorDescriptor which ServerDescriptor inherits from.

    Cheers,
    Benoit.
  • 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.