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

Differentiate ‘Stateful Session’ from ‘Entity Bean’ ?

545


What do you mean by timer service and where it is used?

517


What is ejb and its types in java?

508


how can u integrate ejb and hibernate? How can u call hibernateDAO methods in session bean?

2455


What does statelessness mean?

530






What is @resource in java?

528


Mention the three levels for applying interceptor methods.

539


Differentiate Phantom from Un-repeatable?

567


Define ejb Create() and EjbPostCreate()?

572


What is stateless code?

503


What is stateless programming?

605


What are the different kind of ejb's?

541


What causes statelessness?

485


What are the components of session beam?

649


Why do we use @requestmapping?

524