Session Beans are an EJB technology for encapsulating business processes or workflow. In this chapter we will cover the following topics:
Stateless session beans
Stateful session beans
Annotations
Packaging and Deploying a session bean
Running a session bean client from the application client container
Stateless and Stateful session bean lifecycles
In object-oriented analysis and design a control class encapsulates business logic for a use case. Session beans are used to implement such control classes. Check credit card details, transfer funds, and book reservation are examples of potential session bean candidates. Session beans are transient and relatively short lived. In particular, session beans are not persistent; they are not stored in a database or other permanent file system. Session beans can create and update entities, which are persistent, as we shall see in the following chapters.
A client interacts with a session bean by invoking one or more methods...