Win a copy of Design for the Mind this week in the Design 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