About Goncalo Marques
In this tutorial we will cover Java EE Stateful Session Bean passivation and activation mechanism.
1. Introduction
Stateful Session Beans are usually coupled with some given client and – as the name states – they keep state across client invocations.
Since a conversation with a client may be long-lived, and many simultaneous clients may exist at the same time, the EJB container must have a mechanism of releasing resources that may not be needed at some precise moment.
This is where EJB passivation and activation comes into: The container may passivate an EJB that is not needed at some point in time and later activate it (or recover it) as soon as it’s needed again.
This tutorial considers the following environment:
Source : http://www.javacodegeeks.com/2013/08/ejb-passivation-and-activation-example.html