Home : J-Integra for .NET : INFO : Server-Activated Versus Client-Activated Objects
Q183205 - INFO: Server-Activated Versus Client-Activated Objects

Server-Activated Versus Client-Activated Objects

Server-activated objects are objects whose lifetimes are directly controlled by the server. Server-activated objects are created by the server only when they are needed. They are created when the client invokes the first method on that proxy. Singleton is one of activation modes for server-activated objects. Singleton objects are objects for which there will always be only one instance, regardless of how many clients there are for that object. If an instance does not exist, the server creates an instance and all subsequent client requests will be serviced by that instance.

  • Use server-activated objects when there are clients sharing the same server object. In this case, there is always only one server object exists at any time (singleton of the same kind). The server object is created by the server on the first method on that proxy from any client. It’s a one-to-many relationship between the server object and clients.

Client-activated objects are objects whose lifetimes are controlled by the calling application domain, just as they would be if the object were local to the client. Client-activated objects are created on the server when the client calls new. The client itself, using the lifetime lease system, can participate in the lifetime of the instance. If a calling application domain creates two new instances of the remote type, each of the client references will invoke only the particular instance in the server application domain from which the reference was returned.

  • Use client-activated objects when multiple server instances of the same kind need to be run on the server at the same time. In this case, each of the server instances is created when a client calls new on the server object. The server instance is available for the calling client only. The lifetime of the instance is depending on the lifetime lease system. It’s a one-to-one relationship between each server object and its corresponding client.
Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 7/13/2006.
Last Modified on 7/13/2006.
Last Modified by No Author Name Available!.
Article has been viewed 18489 times.
Rated 7 out of 10 based on 28 votes.
Print Article
Email Article