Home Comments

Ice::Communicator

geslygesly Member Gesly GeorgeOrganization: AQRProject: Service Framework
Hi,

What does calling Ice::initialize(...) multiple times mean? What I am trying to understand is does calling initialize multiple times result in multiple Ice Communicators?

Gesly

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Yes, each call to initialize() creates a new communicator. It is not usually necessary to create more than one.

    Take care,
    - Mark
  • geslygesly Member Gesly GeorgeOrganization: AQRProject: Service Framework
    what do multiple communicators translate to? I mean logically what does that mean, having multiple communicators?
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    You can think of a communicator as an instance of the Ice run time. Each communicator is independently configurable and serves as the container for the resources used by the run time (connections, thread pools, etc.).

    An application typically creates multiple communicators when it needs each one to use different configurations. For example, consider an application that uses SSL and needs to supply multiple identities (i.e., certificates). In this case, it could create a communicator for each identity and configure the IceSSL plug-in of each communicator with the appropriate certificate.

    Take care,
    - Mark
  • geslygesly Member Gesly GeorgeOrganization: AQRProject: Service Framework
    OK. That makes sense now...I see why you would want different 'instance' of the Ice runtime.

    Thanks
    Gesly
Sign In or Register to comment.