Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 47089 invoked from network); 17 May 2007 17:21:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 May 2007 17:21:25 -0000 Received: (qmail 9292 invoked by uid 500); 17 May 2007 17:21:28 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 8916 invoked by uid 500); 17 May 2007 17:21:26 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 8905 invoked by uid 99); 17 May 2007 17:21:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2007 10:21:26 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of kmann@virtua.com designates 65.212.180.92 as permitted sender) Received: from [65.212.180.92] (HELO pyramid-03.kattare.com) (65.212.180.92) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2007 10:21:19 -0700 Received: from synapse2 (64-252-160-242.adsl.snet.net [64.252.160.242] (may be forged)) (authenticated bits=0) by pyramid-03.kattare.com (8.13.8/8.13.6) with ESMTP id l4HHL6RN028939 for ; Thu, 17 May 2007 10:21:06 -0700 Reply-To: From: "Kito D. Mann" To: "'MyFaces Discussion'" References: <10667077.post@talk.nabble.com> In-Reply-To: <10667077.post@talk.nabble.com> Subject: RE: How to Share Session between JSF(MyFaces) and Spring Date: Thu, 17 May 2007 13:42:58 -0400 Organization: Virtua, Inc. Message-ID: <01fe01c798aa$d2fce5c0$78f6b140$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AceYn4asB0afHi3GSxOJfmcAdHihxQACv09w Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org 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.