Archived

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

servant lifetime

Hi !

My question concerns the possible modes of servant instantiation.

In theory, the servant can be instantiated in three different ways:
1. servant is instantiated on server start-up and dies when the server terminates;
2. servant is instantiated for client session and dies when the client stops its session;
3. servent is instantiated for each method invocation.

The first mode is the Ice default implemented via ASM.
The third mode can be implemented via servant locator.
Both the first and the third modes have stateless semantic and in this sense they are similar to Web Services.

But what about the second mode ? Is it supported by Ice ?

Without this mode the user has a problem.
Indeed, either the entire object state would need to be passed around in the invocations belonging to one session, or the state would be maintained by the server, and a session-id passed around. This can complicate the user applications.

--
Best regards, Nikolai

Comments