When you will chose Stateful session bean and Stateless session bean

Showing Answers 1 - 5 of 5 Answers

Natesh

  • Mar 20th, 2005
 

stateful session bean is used when we need to maintain the client state .Where stateless session bean will not have a client state it will be in pool.Example of statefull session is Shoping cart site where we need to maintain the client state .

Rokkam

  • Jun 2nd, 2005
 

To maintain the state of the bean we prefer stateful session bean and example is to get mini statement in  
ATM we need sessions to be maintained.

  Was this answer useful?  Yes

Rahul Pundhir

  • Jul 14th, 2005
 

Thanks for giving me the proper Guidence

  Was this answer useful?  Yes

divya

  • Jul 29th, 2005
 

Stateful session beans are used when there is converstional state and when there is a need of temporary storage 
 
Stateless session bean are used when there is no conversational state and when session bean has to be used only for database access

  Was this answer useful?  Yes

Naveen

  • Jun 6th, 2006
 

I'll  take a best exmaple to explain.

Statefull sessionbean : ATM operation

Stateless Session Bean : Credit card

Once we log into the ATM by entering PIN number. We can do multiple transacations like Balance enquiry, Withdrawl, ministatement..etc... For every transaction to client state is maintained and not required to enter for each transaction.

Coming to credit card operation.. There is only one transaction possible and for next transaction u required to authenticate again means no client state for second transaction...hence it is stateless

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions