Extending the Sample with Client-Activated Objects

So far, this chapter has demonstrated various methods of hosting server-activated objects and shown the client code necessary to interact with them. As discussed in Chapter 2, the .NET Framework offers a second form of remote objects: client-activated objects. Client-activated objects are “activated” on demand from the client, exist on a per-client and per-reference basis, and can maintain state between method calls.

To demonstrate client-activated objects, let’s extend the JobClient sample application by enabling users to add notes associated with a selected job. To support adding notes, we’ll add a class derived from MarshalByRefObject named JobNotes, which we’ll configure as a client-activated ...

Get Microsoft® .NET Remoting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.