Archived
This forum has been archived. Please start a new discussion on GitHub.
Ice 3.1: Communicator.setDefaultContext()
stephan
in Help Center
Hi!
I installed the latest Ice packages a couple of minutes ago and tried to recompile some of our code.
Unfortunately, the setDefaultContext() function seems to be missing in the communicator and I cannot find no info on why it is missing and how it was replaced.
Could you please post some info on this? This function is really useful so I hope that it wasn't removed in this release without new functionality for such things...
regs,
Stephan
I installed the latest Ice packages a couple of minutes ago and tried to recompile some of our code.
Unfortunately, the setDefaultContext() function seems to be missing in the communicator and I cannot find no info on why it is missing and how it was replaced.
Could you please post some info on this? This function is really useful so I hope that it wasn't removed in this release without new functionality for such things...
regs,
Stephan
0
Comments
-
Hi Stephan,
Please see section 30.3 in the Ice 3.1.0 manual for information on how to configure a communicator with a default context. Briefly, you now need to create an instance of InitializationData, which contains the member defaultContext, and pass that structure to initialize.
Take care,
- Mark0 -
Hi Mark!
Thanks for the hint. However, how can I modify the default context during runtime? We are frequently using contexts to pass login cookies from client to server because it's much simpler to use in some cases than Glacier2.
I.e., I first use the communicator without a certain context and then have to modify it during runtime. Imho that's the normal usage of the default context.
Stephan0 -
Could you make it possible to modify the initialization structure after the communicator is initialized? This might not only make sense for the default contxt but for other structure items as well.
To put it in other words: why is it called 'initialization data' structure and not 'configuration data' structure?
Hope that you can make available a patch for 3.1.
regs,
Stephan0 -
stephan wrote:Could you make it possible to modify the initialization structure after the communicator is initialized?
No, that's not possible. The whole point of this InitializationData parameter is to provide one-off data to the communicator. After initialization, the communicator can read these members without synchronization since it knows they can't change.
Cheers,
Bernard0 -
hmm. ok, I understand.
As you have left out the default locator and the router of the initialization structure because they might change during runtime (I'm not sure whether runtime changes happen with default locators but anyway), you should probably also remove the default context from the initialization structure and provide separate getters/ setters for it as it was before.
Stephan0 -
0
