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 stateful and stateless
session beans?

Answer Posted / kunwar dharmendra singh

Stateful vs. Stateless Session Beans
A stateful session bean will maintain a conversational state
with a client. The state of the session is maintained for
the duration of the conversation between the client and the
stateful session bean. When the client removes the stateful
session bean, its session ends and the state is destroyed.
The transient nature of the state of the stateful session
bean should not be problematic for either the client or the
bean, because once the conversation between the client and
the stateful session bean ends, neither the client nor the
stateful session bean should have any use for the state.

A stateless session bean will not maintain conversational
states for specific clients longer than the period of an
individual method invocation. 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. The
transient nature of this state gives the stateless session
bean beneficial attributes, such as the following:

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is more beneficial: CMP or BMP?

1043


What are the design principles for ejb?

921


In what format is the conversational data written to the disk?

1001


What is the advantage of using entity bean for database operations, over directly using jdbc api to do database operations?

1009


What is the use of @resource?

1074


Is ejb a framework?

978


What is difference between stateless and stateful?

1008


Is it possible to write two ejb’s that share the same remote and home interfaces, and have different bean classes? If so, what are the advantages/disadvantages?

1072


What is ejb and its types in java?

1017


What are the components of session beam?

1076


Write down the steps for the creation of stateless ejb.

1010


What are the various types of entrepreneur java bean?

957


What is ejb 3?

937


What is applicationscoped?

973


What is ejb and its uses?

983