Designing the Stateless Session Bean

Figure 5.2 shows the design of the SignOn component. The SignOn stateless session bean implements the SessionBean interface. It implements the methods setSessionContext(), ejbCreate(), ejbActivate(), ejbPassivate(), and ejbRemove() as defined in the javax.ejb.SessionBean interface. In addition, it implements the validateUser() method, which accepts the user's login name and password as parameters and returns true if they are valid.

Figure 5.2. SignOn stateless bean design.

We also provide remote interfaces to our stateless session bean. They include a remote home interface (SignOnHome) and a remote interface ...

Get Sams Teach Yourself EJB in 21 Days 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.