Does javascript implementation respect Ice.Config parameter?

smandysmandy Andy SmithOrganization: Self EmployedProject: Learning IceMember

Looks like Ice.initialize( [ '--Ice.Config=/path/to/config'] ) doesn't load my config file when running under node. The resulting communicator has a property Ice.Config set to the path specified.

Is this to be expected?

Cheers,

A.

Tagged:

Comments

  • xdmxdm La Coruña, SpainJose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice DeveloperAdministrators, ZeroC Staff ZeroC Staff

    Hi Andy,

    This is a limitation of the JavaScript mapping, the properties class doesn't allow to load config files, that was to keep browser and NodeJS working the same way.

    You can use the internal API to pass the contents of the config file, but being an internal API it could change over time.

    var properties = Ice.createProperties();
    properties.parse(require("fs").readFileSync("client.config", {encoding: "utf8"}));
    
  • smandysmandy Andy SmithOrganization: Self EmployedProject: Learning IceMember

    Okay makes sense. Thanks for getting back.

    Cheers,

    A.

Sign In or Register to comment.