what is the difference between stateless and stateful
sessions?
Answer Posted / amar
1.when we use stateless, we look up the bean, call a method,
we give up the bean reference, the bean return to pool;
2.when we use stateful, we look up the bean and keep the
reference for a long time(may several minutes to hours, say
shopping cart), we call methods sometime. if we use
stateless, each client will always associated one bean in
memory, it costs a lot! for stateful, we don't need to worry
about it too much, the container will passivate some of them
to disk when resource is not enough. I think it is the real
benefit of stateful session bean.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
How do I use a less than or greater than on a message selector in ejb-jar.xml?
What do you mean by ejb ql?
How can one EJB be called from within another EJB?
What are the components of session beam?
What are the key features of the ejb technology?
How to generate ejb stubs in eclipse?
What is the procedure for the creation of stateless ejb?
What is entity beans in ejb with example?
What is activemq used for?
What is difference between ejb 1.1 and ejb 2.0?
What are the benefits of ejb?
What is ejb bean in java?
Enlist the changes in EJB 2.1 ?
How to increase ejb transaction timeout in weblogic?
Mention the three levels for applying interceptor methods.