Archived

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

communicator form _current.adapter.getcommunicator vs ice.application.communicator

what is the differences of both of them _current.adapter.getcommunicator() & ice.application.communicator() ?

i got null value when retrieve properties from communicator from Ice.Current (_current.adapter.getcommunicator().getproperties().getproperty("mykey"))

but i got the value when i use ice.application.communicator().getproperties().getproperty("mykey")

why it's happen? am i wrong?

Comments

  • matthew
    matthew NL, Canada
    Ice::Application::getCommunicator() returns the global communicator provided by the application object. Ice::Current::getCommunicator() returns the communicator hosting the servant. In a typical application using Ice::Application these should be the same communicator. It sounds to me like you are creating a second communicator.