Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why stateless bean are more scalable

 
reshu goyal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
why stateless bean are more scalable than statefull bean
tahnks
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
statefull beans are tied to a client (until they are removed), stateless beans can talk to many different clients between method calls.

Therefore you don't need as many beans in the pool with stateless beans - saving resources.
 
Praveena Jayanthi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The stateless session beans are pooled on the server startup( reused after the EJB method calls end).

The stateful session beans are created on client demand and are destroyed after use.
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A stateful session bean can keep data between client calls. This means resources (memory, db connection, etc.) are held by the bean waiting for another call from the client.

A stateless session bean does not keep data between client calls. All resources are released after each call and available to other users.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic