This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSession vs Session Beans

 
rajareddy annavaarm
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when to use stateful session beans and when to use HttpSession.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those are completely unrelated terms.
 
rajareddy annavaarm
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we are persiting data at server side using HttpSessions.Then why do we need to use stateful session beans.Because stateful session beans are also using to persist data on server side.

if i use persist the data of a specific client using Http Sessions,then what is the use of statefull session beans.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rajareddy annavaarm:
we are persiting data at server side using HttpSessions.Then why do we need to use stateful session beans.Because stateful session beans are also using to persist data on server side.

if i use persist the data of a specific client using Http Sessions,then what is the use of statefull session beans.


We are not persisting data in server using HTTPSession.Its used my web application to keep track of user session and has a mechanism to store object in it.Its part of servlet api.

Stateful session bean generally represents process/operation but it can store client specific information untill the client removes it.It an EJB component and hence part of EJB api.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

if i use persist the data of a specific client using Http Sessions,then what is the use of statefull session beans.

How do you use an HttpSession when your client application is not an web application?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic