This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Manage session between servlet and session ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Manage session between servlet and session ejb" Watch "Manage session between servlet and session ejb" New topic
Author

Manage session between servlet and session ejb

Jim Baker
Ranch Hand

Joined: Mar 10, 2002
Posts: 177
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
johnckendall
Greenhorn

Joined: Aug 23, 2001
Posts: 6
If you have gone for the stateful session ejb design then you would have to store the session info in the HTTPSession object in order to be able to recall it.
Of course, stateless is always better for EJB if you can get the HTTP session object to handle the session stuff...


John C. Kendall<BR>jkendall@technologist.com<BR>johnlkendall@palm.net
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Manage session between servlet and session ejb
 
It's not a secret anymore!