• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stateful session bean or servlet

 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when to Use a Servlet to manage the users session?
when to Use a Stateful Session Bean to manage the users session?
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody around here claimed SSBs scaled better than HttpSessions.
 
Thomas Hofmann
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SFSB provide thread syfety, lifecycle managment and can be used by different client types (not only web browsers).
HTTP Sessions (Servlet in your question) can be easily programmed.
SFSB can be used in clusters by replica aware stubs. There are app servers that also provide HTTP session clustering.
 
Deep Arora
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use SFSB when
1) U need Transaction aware components
2) varied Client types
3) reusebility of business logic is an issue
4) if business process involves only single HTTP request and multiple beans are collabrating to fulfill request. And a been not recvng direct call from client needs to assess the client specific session data.
Thanks
Deepak Arora
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic