Return-Path: Delivered-To: apmail-jakarta-avalon-dev-archive@apache.org Received: (qmail 12078 invoked from network); 2 Jan 2002 09:11:03 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Jan 2002 09:11:03 -0000 Received: (qmail 27715 invoked by uid 97); 2 Jan 2002 09:11:07 -0000 Delivered-To: qmlist-jakarta-archive-avalon-dev@jakarta.apache.org Received: (qmail 27655 invoked by uid 97); 2 Jan 2002 09:11:06 -0000 Mailing-List: contact avalon-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon Developers List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-dev@jakarta.apache.org Received: (qmail 27642 invoked from network); 2 Jan 2002 09:11:05 -0000 Message-Id: <200201020911.g029B4c28950@mail016.syd.optusnet.com.au> Content-Type: text/plain; charset="utf-8" From: Peter Donald To: "Avalon Developers List" Subject: Re: lifecycle management Date: Wed, 2 Jan 2002 20:07:05 +1100 X-Mailer: KMail [version 1.3.2] References: <20020101204346.98230.qmail@web20909.mail.yahoo.com> In-Reply-To: <20020101204346.98230.qmail@web20909.mail.yahoo.com> X-Wisdom-Cookie: . MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Wed, 2 Jan 2002 07:43, vinay nair wrote: > Hi, > Have been reading the excellent artifact written by > Berin Loritsch on "Developing with Avalon" . > > A query derived from there. > (from page 32). > Why does an individual component have to be made to > write code so as to honor a policy of lifecycle > management; which is that methods calls like > configure(),compose() ...etc has to be called ONCE and > only ONCE during components lifetime and we have to > write code to keep track of that with boolean flags > indicating whether the method was called or not. > > I mean why doesn't the LifeCycleHelper class itself > keep track about the number of times the component's > lifecycle methods . > This would also remove that small mess of boolean > flags created in each component to keep track of this > behavior. > (private boolean initialized = false;private boolean > disposed = false; etc.... > ) > > Is this way of tracking of *valid* calls made to the > components outside the component , a poor design.? I think so ;) However others disagree. Personally if I see any code like that in lifecycle interfaces I go through and remove it. Others like it so do what you are more comfortable with. BTW There was a thread about this not long ago on this list (I think it had "ComponentValidator" in the title) if you want to see some of the discussions. -- Cheers, Pete "You know what a dumbshit the 'average man' on the street is? Well, by definition, half of them are even dumber than that!" J.R. "Bob" Dobbs -- To unsubscribe, e-mail: For additional commands, e-mail: