From dev-return-99718-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Tue Jul 15 13:09:10 2008 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 18743 invoked from network); 15 Jul 2008 13:09:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jul 2008 13:09:10 -0000 Received: (qmail 20509 invoked by uid 500); 15 Jul 2008 13:09:09 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 20146 invoked by uid 500); 15 Jul 2008 13:09:08 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 20135 invoked by uid 99); 15 Jul 2008 13:09:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 06:09:08 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ap-cocoon-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jul 2008 13:08:15 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KIkGj-0007xk-SJ for dev@cocoon.apache.org; Tue, 15 Jul 2008 13:08:38 +0000 Received: from vpn.rauser-ag.com ([62.157.169.229]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Jul 2008 13:08:37 +0000 Received: from joerg.heinicke by vpn.rauser-ag.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Jul 2008 13:08:37 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org From: Joerg Heinicke Subject: Re: [Corona] PIpeline API Date: Tue, 15 Jul 2008 13:08:29 +0000 (UTC) Lines: 32 Message-ID: References: <48775DFE.7020903@apache.org> <487A10D8.3050908@apache.org> <487B03F4.8050901@apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 62.157.169.229 (Mozilla/5.0 (Windows; U; Windows NT 5.2; de; rv:1.9) Gecko/2008052906 Firefox/3.0) Sender: news X-Virus-Checked: Checked by ClamAV on apache.org Carsten Ziegeler apache.org> writes: > >> c) Pre and post processing > >> As the pipeline interfaces are not tied to sax or any other model > >> (which is ok), there is no explicit notion of indicating that the > >> processing starts or is finished - the latter is especially > >> interesting for cleanup. So I think we should add these two lifecycle > >> methods to the pipeline component interface. > > > > I don't see any problem either. Being curious, what are your use cases? > I've some pipeline components that open/close resources, like a JCR > session for instance. If the contract includes that the pre and post > processing methods are always called, the post processing method acts > like kind of a disposal method where I can close my session. > I've other - in this sense rather obscure - use cases where the pipeline > components need to pass information back to the caller before the > processing starts. So the caller calls the pre processing method where > the pipeline component adds something to the map, the caller can pick it > up and then start the processing based in this information. Isn't that a rather specific use case? It feels kinda "wrong" when lifecycle methods will now "pollute" the pipeline interfaces rather than letting pipeline components implement lifecycle interfaces. Doesn't Spring show how to do these kind of things with templates or aspects? And is there actually something like "start" and "end" in a pipeline? How do you determine that? It's rather easy with SAX since there is startDocument() and endDocument() but in general? It's not an objection, just some thoughts ... Joerg