What are client activated objects and server activated objects?

Showing Answers 1 - 1 of 1 Answers

Praveen V

  • Sep 23rd, 2005
 

1. Basically for a SAO, the lifetime of the object is controlled by server, whereas for a CAO, the lifetime is controlled by the client.Below are definitions from MSDN. Server activated objects includes Single Call & Singleton.Single Call objects service one and only one request coming in. Single Callobjects are useful in scenarios where the objects are required to do afinite amount of work. Single Call objects are usually not required tostore state information, and they cannot hold state information betweenmethod calls. However, Single Call objects can be configured in aload-balanced fashion.Singleton objects are those objects that service multiple clients and henceshare data by storing state information between client invocations. Theyare useful in cases in which data needs to be shared explicitly betweenclients and also in which the overhead of creating and maintaining objectsis substantial.Client-activated objects (CAO) are server-side objects that are activatedupon request from the client. This way of activating server objects is verysimilar to the classic COM coclass activation. When the client submits arequest for a server object using "new" operator, an activation requestmessage is sent to the remote application. The server then creates aninstance of the requested class and returns an ObjRef back to the clientapplication that invoked it. A proxy is then created on the client sideusing the ObjRef. The client's method calls will be executed on the proxy.Client-activated objects can store state information between method callsfor its specific client and not across different client objects. Eachinvocation of "new" returns a proxy to an independent instance of theserver type.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions