Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 6406 invoked from network); 28 Jun 2004 13:52:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Jun 2004 13:52:32 -0000 Received: (qmail 38183 invoked by uid 500); 28 Jun 2004 13:52:32 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 38111 invoked by uid 500); 28 Jun 2004 13:52:31 -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 Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 38072 invoked by uid 99); 28 Jun 2004 13:52:30 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received: from [212.227.126.184] (HELO moutng.kundenserver.de) (212.227.126.184) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 28 Jun 2004 06:52:29 -0700 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BewYW-0000Lc-00 for dev@cocoon.apache.org; Mon, 28 Jun 2004 15:52:20 +0200 Received: from [217.228.234.195] (helo=[192.168.0.15]) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1BewYV-0007Ea-00 for dev@cocoon.apache.org; Mon, 28 Jun 2004 15:52:19 +0200 Message-ID: <40E02281.1010504@gmx.net> Date: Mon, 28 Jun 2004 15:52:01 +0200 From: Stephan Coboos User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: component lifecycles References: <40E002DF.1010706@hippo.nl> <40E00474.4020608@hippo.nl> <8F135AA5-C905-11D8-8D76-0003935AD2EE@media.demon.co.uk> In-Reply-To: <8F135AA5-C905-11D8-8D76-0003935AD2EE@media.demon.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:431002173563032d2d00337e9d76f4cf X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Jeremy Quinn wrote: > How would I organise this differently, in the situation where I had > several of these Components, each differently configured, that I > wanted to be able to load in FlowScript in a similar way. Maybe we > want one setup for read-only privs and another setup for read-write > privs etc. Use the ServiceSelector like for DataSources. I dont't know where documentation about this can be found, but the sources of Cocoon should contain many lines of that kind and a search on "ServiceSelector" should help. Using a ServiceSelector, a entry in cocoon.xconf looks like: In a java class the code to retrieve the component foo1 should be something like: ServiceSelector selector = (ServiceSelector)this.serviceManager.lookup(Foo.ROLE); ... Foo foo1 = (Foo)selector.select("foo1"); ... Hope this few lines helps. Regards