Summary

Today you learned the fundamentals of session beans. Session beans execute a particular business task on behalf of a single client during a single session. There are two types of session beans: stateless and stateful. Stateless session beans do not maintain the conversational state associated with any client. Stateful session beans maintain the conversational state associated with a client.

The EJB container maintains an instance pool for each type of stateless session bean. The EJB container may reuse the same instance to serve multiple client requests.

Passivation and activation are mechanisms that are provided by the EJB container to manage the valuable resources in order to reduce the number of stateful session bean instances required ...

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.