i am using Springs DelegatingVariableResolver to make my Spring beans accessible from JSF layer . Thats exactly how i am passing user session object ( i.e. user Id and user Roles ) as argument to business method in Spring.
I am able to retrieve this user session object & its attributes into Base bean of Spring Layer but the subclasses of Base bean are not able to get the same value as in Base bean even though i declare them as protected <variable_name> When i reached this point, i started rethinking on my design whether its good way to pass HttpSession object as argument to business method in Spring OR Should i use Servlet Filters but again how to access it in business Layer as Spring doesnt provide any handle to HttpServletRequest in business Layer. The other issue was ThreadLocal Finally when i ran out of options i posted on Forums to see how other people are doing Regards Bansi Nebinger, David wrote: > >> Thanks Everyone for providing valuable suggestions We >> usein-house Security system which gives employee Id and >> Roles on successful authentication. We need to store >> employee Id &Roles into some kind of object maybe session so >> that it can be accessible by any Spring bean in the business layer. >> David i totally agree with you that i should rethink my >> design . Not sure whats the best practice to pass user info >> viz. user Id , user Roles , privileges etc from JSF to Spring. >> Are you refering to POJO instead of session object for >> wrapping userId and roles. Thats a good idea even i thought >> about BUT users will have different session objects with >> their user Info in it and also we want the Lifecycle of the >> object to be under session i.e. as the session terminates the >> object should be destroyed > > Well, I guess an option here is to mimic what acegi would do; place the > authentication object into a ThreadLocal object. That way it is > available to any layer w/o requiring any runtime binding... > > > -- View this message in context: http://www.nabble.com/How-to-Share-Session-between-JSF%28MyFaces%29-and-Spring-tf3772789.html#a10687302 Sent from the MyFaces - Users mailing list archive at Nabble.com.

