Chapter 3. The Client View: Exposing Yourself

image with no caption

You can’t keep your bean private. Clients need to see what you’ve got. (Except for message-driven beans, which don’t have a client view). The Advice Bean exposed the getAdvice() method in its Component interface—the place where you declare business methods. But that’s not all the client sees. Remember, the Advice interface extended EJBObject, an interface with methods of its own. Methods the client can see. Methods the client can call. And it works the same way with the Home interface. In this chapter, we’ll learn what you really expose to the client, and how the client works, including both Remote and local interfaces.

Get Head First EJB 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.