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

How do I use a less than or greater than on a message selector in ejb-jar.xml?

953


What do you mean by ejb ql?

1012


How can one EJB be called from within another EJB?

976


What are the components of session beam?

1060


What are the key features of the ejb technology?

1061


How to generate ejb stubs in eclipse?

1263


What is the procedure for the creation of stateless ejb?

961


What is entity beans in ejb with example?

959


What is activemq used for?

942


What is difference between ejb 1.1 and ejb 2.0?

992


What are the benefits of ejb?

990


What is ejb bean in java?

1050


Enlist the changes in EJB 2.1 ?

1015


How to increase ejb transaction timeout in weblogic?

1114


Mention the three levels for applying interceptor methods.

989