When are stateless session beans and stateful session beans used?
September 18th, 2006 by uCertify
Leave a reply »
Stateless Session Bean: A stateless session bean does not maintain a conversational state for a particular client. It is appropriate when the following conditions are satisfied:
The bean needs to hold data about the client across method invocation.
The bean state represents the interaction between the bean and a specific client.
The bean manages the work flow of several enterprise beans.
The bean mediates between the client and the other components.
Stateful Session Bean: A stateful session bean is well suited for implementing a business task dedicated to a single client that maintains a conversational state between the bean and the client. It is appropriate when the following conditions are satisfied:
The bean has no specific data for a specific client.
The bean performs a generic task for all clients, in a single method invocation.
The bean is used to fetch only read-only data for clients. Download free practice test for SUN SCJA exam.
Best exam simulation SUN CX310-019 download free trial.