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
Enlist the enterprise beans types?
What is a local interface?
What is activemq used for?
What do you mean by EJB architecture?
Elucidate callback in ejb?
Explain the concept of connection pooling feature of ejb container?
What do you mean by timer service and where it is used?
What is ejb ql?
How to increase ejb transaction timeout in weblogic?
in EJB diclare the static methods are not?
What is ejb application?
The ejb container implements the ejbhome and ejbobject classes. For every request from a unique client, does the container create a separate instance of the generated ejbhome and ejbobject classes?
Why do we use @requestmapping?
Why do we need ejb?
What is ejb and its architecture?