• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB session & Servlet session

 
Yogender Butola
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
My Question is "What is the difference between a servlet session and ejb session?"
AND
How will you call an ejb session from a servlet session and how will maitain a users session using both of them?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34669
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Yogender Butola:
Hi all
My Question is "What is the difference between a servlet session and ejb session?"
AND
How will you call an ejb session from a servlet session and how will maitain a users session using both of them?

Yogender,
1)A servlet session is also called an HTTPSession. This is commonly used to store a user's data between requests. An EJB session is used if you want to store data in a stateful session bean.

2) Why would you want to store the user's data in two places? This adds extra complexity without any benefit that I can see.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic