|
|
| EJB |
Expert:Shyam Sunder Reddy
What is the difference between Stateless session bean and Statefull session bean? what are the lifecycle methods of both SLSB and SFSB |
| Answers |
Hi friend,
Some points to be remember for difference between Stateless session bean and Statefull session bean.
*) Stateful beans are also Persistent session beans. They are designed to service business processes that span multiple method requests or transactions. *)Stateless beans are designed to service business process that last only for a single method call or request. *) Stateful session beans remembers the previous requests and reponses. Stateless session beans do not remember the previous request and responses. *)Stateful session beans does not have pooling concept. Stattless session bean instances are pooled. *) Stateful S.Beans can retain their state on behave of an individual client. Stateless S.Beans donot maintain states. *) Stateful S.Beans can be passivated and reuses them for many clients. Stateless S.Beans, client specific data has to be pushed to the bean for each method invocation which result in increase of network traffic.
*)Stateful session beans have the passivated and Active state which the Stateless bean does not have.
*)Stateless Session beans are scalable and can therefore be replaced by an enhanced model whereas Stateful Session beans are not scaleable.
*)state full session bean will maintain the state of the client with server.with activate&passivate methods.
*)ejbActivate() and ejbPassivate() methods are not called in Stateless session beans
For life cycle methods of both SLSB and SFSB visit to :
http://www.roseindia.net/ejb/SessionBean.shtml
Thanks
|
| More Questions |
|
|
Post Answers
Ask Question
Facing Programming Problem?
|
|
|
|
|