Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 63338 invoked from network); 21 Dec 2004 15:02:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Dec 2004 15:02:55 -0000 Received: (qmail 95802 invoked by uid 500); 21 Dec 2004 15:01:30 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 95720 invoked by uid 500); 21 Dec 2004 15:01:29 -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 95704 invoked by uid 99); 21 Dec 2004 15:01:29 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from 10.21.96-84.rev.gaoland.net (HELO mail.anyware-tech.com) (84.96.21.10) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 21 Dec 2004 07:01:26 -0800 Received: from [10.0.0.27] (poukram.anyware [10.0.0.27]) by mail.anyware-tech.com (Postfix) with ESMTP id C35C933559 for ; Tue, 21 Dec 2004 16:02:04 +0100 (CET) Message-ID: <41C83ABD.2090505@apache.org> Date: Tue, 21 Dec 2004 16:01:17 +0100 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [Vote] Component confs per sitemap [was: [RT]] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Carsten Ziegeler wrote: >Sylvain Wallez wrote: > > >>Can you elaborate on "looks like"? If we load the roles files >>from the classpath, this means we define a naming contract >>for these files, e.g. >>either org/apache/cocoon/cocoon.roles as of today or >>META-INF/services/org.apache.cocoon.core.RoleManager. >> >>So files that "look like" roles file are very likely to be >>actual role files and nothing else :-) >> >> >> >Yepp, that's true - hmm, hmm, ahh, > :-D >what if I just want to drop >a particular jar into cocoon as it contains some nice classes. >And of course this jar contains such a roles file, but I don't >want to get the components added to cocoon; i just want to >use the classes. :) > > A component isn't added to Cocoon unless it is explicitely declared in the xconf file. Ah yes, there's also the implicit declaration when a role has a default-class. But this implicit declaration only happens when the code looks up the component, meaning it does more that just using the classes ;-) >Ok, I admit this is very rare - hmm, let me see what other >arguments might be against your approach...hmm > >Ah, if we scan for all role files contained in the jar, all >of these roles are added to the root service manager. But >perhaps I want to restrict the access to those components >by adding them somewhere down in the hierarchy. This >only works by explicitly declaring them, e.g. in the sitemap. > > Mmmh... what does "restrict the access" mean? If the class exists in the jar, anyone can use the component by adding an inline role in their xconf (). The only way we can really restrict access, is by having a per-sitemap classloader or... real blocks! Try again ;-) Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }