hi Stateful sessionBean are dedicated to one client for entire life cycle. 1. Then how the instaces are served to the client? 2. Single instance is served to enire life cycle or the instance is swapped? thanx som
Marcos Maia
Ranch Hand
Joined: Jan 06, 2001
Posts: 977
posted
0
When a client invokes the create method on an statefull EJB home, it�s life cicle begins, the container than invokes newInstance() on the bean class, creating a new instance of it,then the container invokes setSessionContext and finally ejbCreate once the ejbCreate has finished the container than returns the ejb remote reference to the client. About swap I think that it can be implemented and also some kind of pool using cache memory but that�s a vendor specific implementation, but one thing I think most vendors do is passivating the bean when the bean instance is not servicing methods from the client to preserve resources.