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
What is stateless and stateful?
What is passivation and activation in ejb?
What are the system services of ejb container?
Can remove() be a Stateless Session bean?
in EJB diclare the static methods are not?
What is a ejb container?
What is the new basic requirement for a cmp entity bean class in 2.0 from that of ejb 1.1?
How to invoke ejb from java client?
How entity beans support container managed persistence?
How does ejb invocation take place?
What is stateless and stateful session bean in ejb?
Why do we use @requestmapping?
What is ejb in java?
Which is more beneficial: CMP or BMP?
What is difference between ejb and spring?