Chapter 6. RMI Best Practices

William Grosso

Java’s Remote Method Invocation (RMI) framework is a powerful, easy-to-use, and robust framework for building distributed applications. It’s ideal for a wide variety of mid-range applications that don’t fit into the Enterprise JavaBean (EJB) model, don’t require the cross-language capabilities of either CORBA or web services, and don’t use a web browser for a client.

RMI’s ease of use is legendary. But ease of use gets you only so far. In this chapter, I will outline a number of best practices that will enable you to take an ordinary RMI application and turn it into one that performs well, is easy to maintain, and will be useful for years to come.

Because of space considerations, I’ve chosen to focus on three basic areas: marshalling and unmarshalling objects, making applications more robust, and improving application performance.[13]

[13] Neither “using exceptions effectively” nor “versioning an application” made the cut.

Get Java Enterprise Best Practices 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.