O'Reilly logo

Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications by Paul Anderson, Gail Anderson

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

6.5. Session Facade Pattern

Consider what we need to do to integrate our Customer EJB into the Music Collection virtual shopping application (return to Figure 6-2 on page 205). When a user accesses the “login” web page, the JSP client asks for a login name and password. The client must determine if the user name is valid and if the password matches the given user name. We accomplish this multiple-step process by invoking method findByCustomerName(), which returns a collection. The client must then verify that only one Customer instance is in the collection. It then must call getPassword() and check to see if the entity bean's password matches the one provided by the user.

For a JSP client or stand-alone Java client to accomplish this task, we ...

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