Archived

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

set config properties w/o config file

hi,
I couldn't find an answer to this question in the forum.
is there any way to set configuration options (which are normally done in the config file) directly in code?

regards,
dkey

Comments

  • mes
    mes California
    Hi,

    Section 27.8 in the manual should provide the information you need. If not, please let us know.

    Take care,
    - Mark
  • matthew
    matthew NL, Canada
    dkey wrote:
    hi,
    I couldn't find an answer to this question in the forum.
    is there any way to set configuration options (which are normally done in the config file) directly in code?

    regards,
    dkey

    Yes, you can create a Ice::Properties instance and fill it with whatever values you like. Then create a communicator with the properties instance.

    For example,

    Ice::PropertiesPtr properties = Ice::createProperties();
    properties->setProperty("Ice.Trace.Network", "1");
    Ice::CommunicatorPtr communicator = Ice::initializeWithProperties(argc, argv, properties);

    Best Regards, Matthew
  • thx a lot!
    you guys are doing a really good job! :)

    regards,
    dkey