15.2. Creating a Remotely Accessible Standings Object

The best way to gain an understanding of RMI is to write some code. Let's say that for some reason, we'd like a client program to be able to access a Standings object residing on a remote system, but without the use of servlets. The first requirement of RMI is that there must be a remote interface that enumerates the methods that are remotely callable.

Now, because we separated interface from implementation in our application way back in Chapter 2, you might think we would be well set for this. But RMI places some unique requirements on the remote interface. First, the interface itself must extend java.rmi.Remote; then, each method within the interface must throw java.rmi.RemoteException

Get J2EE™ and JAX™: Developing Web Applications and Web Services 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.