Java Reference
In-Depth Information
Figure 3.7. Passivation and activation are critical optimization techniques for stateful session beans.
As you'll see in section 3.3.7 , stateful session beans provide hooks for executing logic right
before passivation and right after activation. Using these hooks, you can write data out to
the database and perform any last-minute operations. Note that just like pooling, passiva-
tion isn't mandated by the EJB specification. But most application servers support passiv-
ation. Just like pooling, it's possible to tune and monitor stateful session bean passivation.
3.3.3. Stateful session bean clustering
Although the EJB specification doesn't require it, most application servers cluster stateful
session beans. This means that the state of the bean is replicated across all machines par-
ticipating in the application server cluster. Even if the machine that your stateful session
 
Search WWH ::




Custom Search