19.2. Creating a Session Bean for the Standings

Converting our Standings class to a session bean involves many of the same steps we went through in preparing the class to be accessed via RMI. This is no surprise, because Enterprise JavaBeans use RMI as the communication mechanism between the client and server portions, and even between beans running in the same container.

For RMI, we needed to create a remote interface to our class. With EJB, we will need to create two (and optionally, as many as four) interfaces. The first interface is the familiar remote interface, just as we created for RMI. The Remote interface describes the methods that are callable from the clients of the EJB, and like the RMI interface, each method in the interface must ...

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.