• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateless vs Stateful beans...

 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I'm new in EJB so I have a little obstacles about understanding purpose and differences between beans in tittle.
What I do not get it is, does stateful beans represent sort of session management in web tier(servlet. JSP) sense, but just in EJB context? I would appreciate if someone give me an 'logical overview from point above' about these two beans. Thanks...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35740
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your understanding is correct. A stateful bean stores state in the EJB layer just as a the HttpSession does so in the web layer.
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I somehow retrieve information stored in web tier (from session scope) when I'm in ejb tier? And one more, is there in ejb sort of 'scope' where I can retrieve the data from, when I'm back in the web tier?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you can't share state between the tiers. But you can pass session information to the EJB tier and recover session information from the EJB tier easy enough.
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. I'm gonna study further and the answer should probably appears at time...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!