Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 98938 invoked by uid 500); 6 Aug 2002 01:50:09 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 98927 invoked from network); 6 Aug 2002 01:50:08 -0000 From: "Vadim Gritsenko" To: Subject: RE: setup() method for components vs. avalon lifecycle Date: Mon, 5 Aug 2002 21:48:24 -0400 Message-ID: <013b01c23ceb$5a728170$df74558b@vgritsenkopc> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <911C684A29ACD311921800508B7293BA0221DC8B@cnmail> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > From: Geoff Howard [mailto:ghoward@crosswalk.com] > > In the process of writing up a tutorial on writing a C2 Generator, I've run > across what seems to be an important question I can't find documented > (imagine that). In a discussion on cocoon-docs, Jens Lorenz suggested > implementing Parameterizable to get at request parameters in the sitemap > (for the context, see > http://marc.theaimsgroup.com/?l=xml-cocoon-docs&m=102828311607253&w=2). > > Obviously, there are a number of ways to get at request parameters - not the > point here. The questions this has raised are: > > 1) I had thought that setup(...) was an avalon defined method, but > apparently it's not. Is there information on how this method was chosen > architecturally? > 2) My understanding is that parameterize(...) is only called once, during > the life of a component. I further assume that this means that each request > for a generator would not call this method again, That's right. > and that reparameterize(...) would have to be employed. Is this correct? That's not exactly right. Reparameterize *could* be called (not that somebody *will* call it in current implementation) only when sitemap has been changed, and generator is given new parameters. In current sitemap implementations, old generator will be discarded and new created (and not only generator, but sitemap itself too). > 3) Is the correct way to get at parameters in a C2 component/generator to > use the org.apache.avalon.framework.parameters.Parameters reference passed > in to setup(...)? What parameters we are talking here about? Declaration-time (inside of ) or invocation-time (inside )? Declaration time: either Configurable or Parameterizable. Invocation time: from setup() method. Request parameters: from request object, but you know this ;) > 4) How is the current lifecycle of C2 components different than that > described at > http://jakarta.apache.org/avalon/framework/reference-the-lifecycle.html > currently? Cocoon uses Excalibur. Whatever supported by excalibur is supported by Cocoon. setup() and generate() methods are Cocoon business methods, defined by Cocoon and are not related to Avalon in any sense. Vadim > Thanks, > Geoff Howard --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org