This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Manage session between servlet and session bean

 
Jim Baker
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to use a servlet to call a session EJB.
Since there is only one instance of servlet in
a web container, how can a stateful session
know which client is calling it? Should I use
stateless sessionbean and pass
HttpSession obj from servlet to the stateless
session bean?
Any comments?
JB
 
NC
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as know, in such cases, you should keep the handle of the stateful session bean in HttpSession and leter retrieve the bean using handle. Please let me know whether this answers your question.
Cheers,
Naresh
 
Jim Baker
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. U did. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic