Remotable and Nonremotable Objects
It is important to remember that an object created in, and therefore specific to, an application domain can be called directly from that domain, but something special must occur before that object can be available outside its domain. Not every type of object can be efficiently published or consumed across domain boundaries; therefore, you must decide which type of object you want to publish based on the needs of your application.
For the purposes of distributed applications, there are two simple categories of objects:
- Nonremotable objects.
Nonremotable objects cannot be copied or represented in another application domain. These objects are accessible only from their original application domain.
- Remotable objects.
Remotable objects can be accessed outside their application domain or context using a proxy, or they can be copied and these copies can be passed outside their application domain or context; that is, some remotable objects are passed by reference and some are passed by value.