Day 5. Developing Stateless Session Beans

Today you'll work on a complete example of developing an enterprise bean. The sample university registration application enables an existing user to log in to the system by verifying his login name and password. It also enables a new user to register her login name and password. Such a component does not need to maintain client-specific state information across method invocations, so the same bean instance can be reused to service other client requests. This can be modeled as a stateless session bean.

The SignOn component verifies the user's login name and password. For the sake of simplicity, the user's login name and password are stored in the deployment descriptor, as environment entries. On Day 21, “Developing a Complete Enterprise Application,” we'll integrate the SignOn component with an entity bean to store and retrieve the user's login name and password from the database.

The following is a summary of today's activities:

  • Learn the interactions between the client, EJB container, and the stateless session bean by looking under the hood of the bean

  • Define the home and component interfaces

  • Implement the stateless session bean class

  • Learn how to write the deployment descriptor for stateless session bean and declare environment entries in it

  • Learn how to compile, package, and deploy the bean in a container

  • Write the client that accesses the stateless session bean

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.147.193