Chapter 2. Session Beans

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

Introduction

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; ...

Get EJB 3 Developer Guide 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.