O'Reilly logo

PURE Java™ 2 by Kenneth Litwak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Calling a Remote Object with a Remote Object Parameter: Code Examples

The code so far has used local parameters. RMI made a copy of the libraryCardNumber string and serialized it in a marshalling stream. For such a small piece of data, that is fine. A very large object might create a performance problem. In the following steps, I will show you how to use a remote object for a parameter so that only the remote reference (and not the whole object) is passed when a remote method call is made by the client. Most of the code and the steps are the same as those for a basic RMI program that passes local objects for parameters, except that you need a remote object for the libraryCardNumber. Therefore, the code will be changed to accept a LibraryCard ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required