what is the difference between stateless and stateful
sessions?

Answer Posted / buddheshwar ojha

BY rahul ojha
A stateful session bean maintains state between client and the statefulbean for a duration of time and once state is end it end session completely it also maintains data persistency(database).(Shoping card etc...)

A stateless session bean does not maintain conversation state for a longer time Instance variables used by a method of a stateless bean may have a state, but only for the duration of the method invocation. After a method has finished running either successfully or unsuccessfully, the states of all its instance variables are dropped.(HTTP , telephone line conversation etc...).

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you be deported if you are stateless?

555


Why do we use ejb?

619


What is an ejb container?

614


Can EJB made to handle multiple transactions?

672


A client wants to preserve the reference to the ejbhome object of an enterprise bean instance and use it later. Which of the following can be serialized for this purpose?

617






What are the system services of ejb container?

707


What were entity beans?

669


Why is ftp stateful?

610


What do you mean by ejb?

633


What are the design principles for ejb?

598


Enlist the CallBack methods of Session Bean?

656


What is ejb client?

646


Name the attributes of javax.ejb.stateful.

648


What is ejb ql?

653


What is ejb in java?

625