Chapter 13 |
||
Lazy Activation
In all the previous examples, the server class extended the UnicastRemoteObject class to create and export a remote object. The UnicastRemoteObject class defines a remote object whose references are valid only while the server process is alive. In order to obtain a reference to a remote object, the server process must be running. This mechanism is sufficient for small applications. If a distributed application were made of thousands of objects, it would be impractical for object implementations to remain active for indefinite period of time. It would be better if the programs could be started automatically when their objects are needed. Java 1.2 adds a new feature of automatic activation of remote objects. The activation system provides two main features:
The ability to have remote objects instantiated on demand, and
|
||
|
||
Copyright © 2001 www.universalteacher.com |
||