myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kito D. Mann" <km...@virtua.com>
Subject RE: How to Share Session between JSF(MyFaces) and Spring
Date Thu, 17 May 2007 17:42:58 GMT
Hello Bansi,

You can inject Spring beans into your JSF managed beans via the Spring
DelegatingVariableResolver. Given that, you should be able to call your
Spring bean methods and pass in the appropriate parameters. Why do your
Spring beans need direct access to the session?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann (kmann@virtua.com)
Author, JavaServer Faces in Action
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info

> -----Original Message-----
> From: bansi [mailto:mail2bansi@yahoo.com]
> Sent: Thursday, May 17, 2007 12:22 PM
> To: users@myfaces.apache.org
> Subject: How to Share Session between JSF(MyFaces) and Spring
> 
> 
> Hi Gurus
> Could you please tell me
> What are the best practices to  pass Session object from JSF to Spring.
> For
> example lets say  LoginBean in JSF has to store userId and userRole in
> Session object and then pass Session object to Spring Layer so that it
> can
> be accessible by any spring bean
> 
> - Do you recommend using Httpsession?
> 
> - Does OpenSessionInViewFilter provides a mechanism to store userId &
> userRole in session & then pass it onto spring layer
> 
> OR
> 
> - Is their any other mechanism that you would recommend for storing
> userId &
> userRoles into Session object at JSF Layer and then retrieve the same
> Session object at Spring layer so that it can be accessible by an
> spring
> bean
> 
> Any pointers/suggestions will be highly appreciated
> 
> Regards
> Bansi
> 
> --
> View this message in context: http://www.nabble.com/How-to-Share-
> Session-between-JSF%28MyFaces%29-and-Spring-tf3772789.html#a10667077
> Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message