What are CAO's i.e. Client Activated Objects ?



What are CAO's i.e. Client Activated Objects ?..

Answer / sarita rawat

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. With client activation, a round trip to the server occurs when the client tries to create an instance of the server object, and the client proxy is created using an object reference (ObjRef) obtained on return from the creation of the remote object on the server. Each time a client creates an instance of a client-activated type, that instance will service only that particular reference in that particular client until its lease expires and its memory is recycled. 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.
In COM, clients hold an object in memory by holding a reference to it. When the last client releases its last reference, the object can delete itself. Client activation provides the same client control over the server object's lifetime, but without the complexity of maintaining references or the constant pinging to confirm the continued existence of the server or client. Instead, client-activated objects use lifetime leases to determine how long they should continue to exist. When a client creates a remote object, it can specify a default length of time that the object should exist. If the remote object reaches its default lifetime limit, it contacts the client to ask whether it should continue to exist, and if so, for how much longer. If the client is not currently available, a default time is also specified for how long the server object should wait while trying to contact the client before marking itself for garbage collection. The client might even request an indefinite default lifetime, effectively preventing the remote object from ever being recycled until the server application domain is torn down. The difference between this and a server-activated indefinite lifetime is that an indefinite server-activated object will serve all client requests for that type, whereas the client-activated instances serve only the client and the reference that was responsible for their creation. For more information, see Lifetime Leases.
To create an instance of a client-activated type, clients either configure their application programmatically (or using a configuration file) and call new (New in Visual Basic), or they pass the remote object's configuration in a call to Activator.CreateInstance. The following code example shows such a call, assuming a TcpChannel has been registered to listen on port 8080.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Remoting Interview Questions

What are the difference between static assemblies and dynamic assemblies?

0 Answers  


What?s SingleCall activation mode used for?

1 Answers  


What is the difference between the RegisterWellknownServiceType(), RegisterWellknownClientType(), RegisterActivatedServiceType() and RegisterActivatedClientType() in .net?

0 Answers  


What is strong name and what is the purpose of strong name ?

8 Answers   Qwest, Sons Of Technology, TCS,


Can you explain remoting?

0 Answers   QuestPond,






Define proxy in .net remoting?

0 Answers  


When we use web service and when we use Remoting?

2 Answers  


Can we configure a .net remoting object via xml file?

0 Answers  


what is Client-activated object in remoting?

0 Answers   DELL,


What does manifest consists?

0 Answers  


How do you reference to a private & shared assembly ?

1 Answers   Digital GlobalSoft,


What is a Windows process?

1 Answers  


Categories