Home Help Center

How to get current IceGrid node and server name within IceBox.Service.start?

voronkovvoronkov Member Sergey VoronkovOrganization: AigrindProject: Game
Hi!

What is most correct way to get current IceGrid node and server name within IceBox.Service.start implementation?

I want to know this to debug my distributed application.

Thanks.

Comments

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

    If you're using the XML deployment mechanism you can set properties with this information in the IceBox service descriptor:
         <service ...>
            <properties>
              <property name="NodeName"    value="${node}"/>
              <property name="ServerName"  value="${server}"/>
              <property name="ServiceName" value="${service}"/>
            </properties>
         </service>    
    

    You can then retrieve these properties with the service communicator properties (see Ice::Communicator::getProperties()).

    Cheers,
    Benoit.
  • voronkovvoronkov Member Sergey VoronkovOrganization: AigrindProject: Game
    Benoit! Many thanks!
Sign In or Register to comment.