Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JSF--> where to store reference to Stateful Session bean  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want to store the reference of a Stateful Session Bean for maintaining state. I know that I can put in a servlet some code to store the reference to the Stateful bean in session.
Then on subsequent invocation servlet can check if the Stateful bean reference exists in HttpSession, and use it to get back to the same Stateful bean. This will work on Struts.


But in JSF we have Faces Servlet passing the control to managed beans. These managed beans can then use Business Delegate (Which uses ServiceLocator) to get to the EJBs.
Managed Beans get bounded value from JSP instead of HTTP Session.


In the above scenario (JSF lifecycle) where/how can i store the Stateful Session Bean reference in HttpSession so that client can go back to the same Stateful Bean?

Any response is much appreciated and Have a great weekend

SCJP 5 91%
SCEA Part 1 93%
 
James Owen
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any help guys?
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the API, specifically

FacesContext
ExternalContext

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Managed Beans can access Http Session too throught FacesContext:




You can try JBoss Seam too.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!