Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is stateless and stateful?

1074


What is passivation and activation in ejb?

955


What are the system services of ejb container?

1078


Can remove() be a Stateless Session bean?

1093


in EJB diclare the static methods are not?

3448


What is a ejb container?

970


What is the new basic requirement for a cmp entity bean class in 2.0 from that of ejb 1.1?

993


How to invoke ejb from java client?

983


How entity beans support container managed persistence?

2456


How does ejb invocation take place?

1024


What is stateless and stateful session bean in ejb?

964


Why do we use @requestmapping?

996


What is ejb in java?

1011


Which is more beneficial: CMP or BMP?

1047


What is difference between ejb and spring?

1001