Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 9471 invoked from network); 27 Jan 2009 20:08:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jan 2009 20:08:02 -0000 Received: (qmail 49420 invoked by uid 500); 27 Jan 2009 17:58:58 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 49382 invoked by uid 500); 27 Jan 2009 17:58:58 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 49371 invoked by uid 99); 27 Jan 2009 17:58:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2009 09:58:58 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of heavy@ungoverned.org designates 69.89.21.20 as permitted sender) Received: from [69.89.21.20] (HELO outbound-mail-25.bluehost.com) (69.89.21.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 27 Jan 2009 17:58:49 +0000 Received: (qmail 24793 invoked by uid 0); 27 Jan 2009 17:58:23 -0000 Received: from unknown (HELO host118.hostmonster.com) (74.220.207.118) by outboundproxy2.bluehost.com.bluehost.com with SMTP; 27 Jan 2009 17:58:23 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=ungoverned.org; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=Gf5GjME/l69Bd+tJxrLzdfo2iSy1cfdhwjQpAWFEyOsB3935jItrw07tETwX8lCkZ3usYqyZbe0/jVi/ofOFO9zFx2EHWyhUFE3KIoQBXXoIVzpPBIU2ujJStLmTxh3Y; Received: from sca-ea-fw-1.sun.com ([192.18.43.225] helo=dhcp-usca14-132-153.SFBay.Sun.COM) by host118.hostmonster.com with esmtpsa (SSLv3:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LRsCl-0006sc-IG for dev@felix.apache.org; Tue, 27 Jan 2009 10:58:31 -0700 Message-ID: <497F4B44.7060006@ungoverned.org> Date: Tue, 27 Jan 2009 09:58:28 -0800 From: "Richard S. Hall" User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: dev@felix.apache.org Subject: Re: Question on base Felix property handling References: <497ECFCC.4000605@ascert.com> In-Reply-To: <497ECFCC.4000605@ascert.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Identified-User: {1027:host118.hostmonster.com:ungovern:ungoverned.org} {sentby:smtp auth 192.18.43.225 authed with heavy@ungoverned.org} X-Virus-Checked: Checked by ClamAV on apache.org Rob Walker wrote: > Wondering if there's any reason why we couldn't allow an alternate > Felix constructor that supports a pluggable property handler e.g. a > custom Map or Property class? > > I seem to recall in the past we did actually have this (the old > xxxResolver flavour). Yeah, we did have that, but you are going back quite a few years. :-) > I know with ConfigAdmin and more recent services there are other more > general ways to handle config, but the original > BundleContext.getProperty() is still very useful for the simple cases. > We'd like to tweak our handling so that all our "get some config > property" go back to a common place, including > BundleContext.getProperty(). Allowing a pluggable property handler / > resolver as an optional way to instantiate Felix would give us a handy > way to do this. Why would this be a feature of the framework as opposed to you introducing your own configuration service from which your bundles get their configuration properties? Then you can do whatever you want. I understand the idea of having to access a service might sound like a bigger PITA than using BundleContext, but ultimately it is quite similar to a service interface that gets injected into your bundle too. You could also centralize access to this service in your bundle somehow so that you do not need to be accessing services all over your code. Just a though. -> richard