Basic HTML version of Foils prepared July 6 99

Foil 25 Session Beans - Passivation&Activation

From Object Web Computing Technologies CPS714 Computational Science Information Track -- June 16 99. by H. Timucin Ozdemir


Since a bean can be using some resources such as socket or database cursor and a container can not retain such resources, EJB defines two callback methods on the object to inform that it is about to be passivated (ejbPassivate()) or activated (ejbActivate()). The implementation of bean is responsible for releasing and obtaining those external resources within these methods.
Container invokes ejbPassivate() method on the bean and then serialize all its fields by using Java serialization.
Container invokes a setSessionContext() method on the EJB session bean to give the a handle to its context where a bean can access its context maintained by the container. Container uses a SessionContext for session beans.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jul 6 1999