Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 40609 invoked from network); 9 Apr 2007 21:02:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Apr 2007 21:02:14 -0000 Received: (qmail 16821 invoked by uid 500); 9 Apr 2007 21:02:17 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 16778 invoked by uid 500); 9 Apr 2007 21:02:17 -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 16767 invoked by uid 99); 9 Apr 2007 21:02:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 14:02:17 -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 andrew.rw.robinson@gmail.com designates 66.249.82.228 as permitted sender) Received: from [66.249.82.228] (HELO wx-out-0506.google.com) (66.249.82.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2007 14:02:09 -0700 Received: by wx-out-0506.google.com with SMTP id i26so1767249wxd for ; Mon, 09 Apr 2007 14:01:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QQsevevaLlzPju0Pn06wCh60xQISxmqMLDe8ByI7XMdJsG+49kd0ESGgcQYq95RDNPie0aWuVFJwKhlEKF+cr+V6n3M9HbG9uNXvWdMycp3k7upEX4iJ+o3cA0GK3mbv5Pk+hBntxWbs1BtKAI0JpzKi0C6wvpddxVj1vB+4Wv0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QokBN2/N7tweE6N0HE1hTKzXhUVpN79bPYnvk0EzqCBY+dQtgS9g7ih5ka07ckRpfW/SbyItjyrnJsmqQr82FUX6Ai8EorZAIs70PRpKggWAHztaX+5hRU77yZS8vVbkYFeJcuGswiVFrhAJlhyyMJn/Wu7hq7dYPZ3SNsl28Ls= Received: by 10.100.166.14 with SMTP id o14mr4342286ane.1176152508993; Mon, 09 Apr 2007 14:01:48 -0700 (PDT) Received: by 10.100.14.19 with HTTP; Mon, 9 Apr 2007 14:01:48 -0700 (PDT) Message-ID: Date: Mon, 9 Apr 2007 15:01:48 -0600 From: "Andrew Robinson" To: "MyFaces Discussion" Subject: Re: Component Binding issues In-Reply-To: <461AA8D2.20609@rhe.co.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <461AA8D2.20609@rhe.co.nz> X-Virus-Checked: Checked by ClamAV on apache.org They can also cause issue with duplicate IDs if the ID of the bound component is auto-generated On 4/9/07, Simon Kitching wrote: > Phanidhar Adusumilli wrote: > > Section 3.1.5 of the JSF specification, recommends not use component > > bindings at session/application scope. > > > > What are the issues in binding components to manged beans at > > session/application scope? > > A UIComponent object has references to its parent and all its children. > Therefore if you store a reference to any UIComponent in a session-scope > bean then the entire component tree for a particular view is kept in > memory. > > Session-scope backing beans are generally a bad idea anyway; they waste > memory as they are created when a user accesses some view then hang > around until the user logs out even if the user never revisits that > view. If this object has a reference to a UIComponent, therefore keeping > an entire component tree in memory too (see above) then that's even > worse. There are some cases where session-scoped beans are appropriate > but normal "backing beans for views" should be request-scoped wherever > possible. > > Referencing a component from an application-scope bean (ie one shared > between users) just makes no sense at all. Components are not > thread-safe but application-scope beans are shared between users and > therefore must be thread-safe. >