Chapter 6. Session EJBs

Overview

We have already discussed the basic principles of session EJBs and seen a very simple example. In this chapter, we will examine the session EJB in much more detail. We start with stateful session EJBs, as their life cycles are conceptually simpler. We will discuss, in particular, issues relating to instance management: activation, passivation, and timeout. We then move on to stateless session EJBs, explaining how the EJB container can optimize performance by pooling instances and the implications that such pooling has for the developer. We will see these principles at work by analyzing the behaviour of the session EJB from Chapter 4 in detail. Finally, we present a more realistic session EJB example and give ...

Get Applied Enterprise JavaBeans™ Technology 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.