Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 55406 invoked from network); 20 Oct 2006 14:35:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Oct 2006 14:35:02 -0000 Received: (qmail 14582 invoked by uid 500); 20 Oct 2006 14:34:59 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 14382 invoked by uid 500); 20 Oct 2006 14:34:58 -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 14362 invoked by uid 99); 20 Oct 2006 14:34:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 07:34:58 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.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; Fri, 20 Oct 2006 07:34:52 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GavRy-0000Fv-9D for dev@cocoon.apache.org; Fri, 20 Oct 2006 16:34:18 +0200 Received: from darkstar.fullsix.com ([62.210.111.209]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Oct 2006 16:34:18 +0200 Received: from bruyeron by darkstar.fullsix.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Oct 2006 16:34:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org From: Renaud Bruyeron Subject: Re: isolate the pipeline "component" from rest of cocoon Date: Fri, 20 Oct 2006 16:33:51 +0200 Lines: 35 Message-ID: References: <4538C399.6000206@reverycodes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: darkstar.fullsix.com User-Agent: Thunderbird 1.5.0.7 (X11/20060922) In-Reply-To: <4538C399.6000206@reverycodes.com> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Vadim Gritsenko wrote: > Renaud Bruyeron wrote: >> > It is possible to use pipelines directly, it would look something like: > > ...setup container... Is that the avalon container, or is it a spring container? Is there an example of this somewhere? > > ProcessingPipeline pipeline = new [Non]CachingProcessingPipeline(); > pipeline.enableLogging(...); > > while (...) { > pipeline.setup(new Parameters()); > > // Pipeline will get generator from container > pipeline.setGenerator("file", ...); > pipeline.addTransformer("xslt", ...); > pipeline.setSerializer("html", ...); > > Environment env = new BackgroundEnvironment(...); > pipeline.process(env); > pipeline.recycle(); > } This looks simple enough. The recycle() method is not part of the ProcessingPipeline interface, but all its implementations are Recyclable (I guess this is avalon speak for "to be used in a pool", and therefore I can assume that the implementations are not threadsafe, right?). Am I correct in assuming that cocoon pools instances of the pipelines (one per thread) when in a webapp context ? - Renaud