Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the Difference between HttpSession and EJB SesssionBeans?

 
rajareddy dodda
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

i would like to know the difference between HttpSession and EJB SessionBeans. which one is used when? thanks in advance
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajareddy,
Welcome to JavaRanch!

They are in different layers of the application. A HttpSession is used in the front end/web layer of an application to keep track of data specific to a user. An EJB Session bean is used in the back end/EJB layer. There are two types of session beans. A stateful session bean can also keep track of data specific to a user. A stateless session bean cannot keep track of state.
 
rajareddy dodda
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your fast replay, but still i have one doubt .can we maintain one session objct to the complete application that application has both weblayer and Ejb layer?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic