• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

STATELESS session bean...

 
Senthil Gangatharan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
****************
STATELESS session bean CAN have instance variables, but there is no guarantee, that these variables will be accessed by the same client. However, the instance variables of the instance can contain the state across client-invoked method calls.. Examples of such states include an open database connection and an object reference to an EJB object
****************
Ranchers,

---Does this mean that If I call more than one consecutive business method calls, then I will get the same Bean instance?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.

Your statement is almost exactly what it says on page 87 (7.8 Stateless session beans) of the EJB 2.0 specification - a little bit further it also states:


Because all instances of a stateless session bean are equivalent, the container can choose to delegate a client-invoked method to any available instance. This means, for example, that the Container may delegate the requests from the same client within the same transaction to different instances, and that the Container may interleave requests from multiple transactions to the same instance.
 
Senthil Gangatharan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peer Reynders,
Got it. Thank you...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic