Return-Path: Delivered-To: apmail-incubator-felix-dev-archive@www.apache.org Received: (qmail 80365 invoked from network); 19 Mar 2007 07:56:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2007 07:56:55 -0000 Received: (qmail 28362 invoked by uid 500); 19 Mar 2007 07:57:03 -0000 Delivered-To: apmail-incubator-felix-dev-archive@incubator.apache.org Received: (qmail 28325 invoked by uid 500); 19 Mar 2007 07:57:03 -0000 Mailing-List: contact felix-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: felix-dev@incubator.apache.org Delivered-To: mailing list felix-dev@incubator.apache.org Received: (qmail 28314 invoked by uid 99); 19 Mar 2007 07:57:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2007 00:57:03 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of fmeschbe@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2007 00:56:54 -0700 Received: by ug-out-1314.google.com with SMTP id y2so1402597uge for ; Mon, 19 Mar 2007 00:56:33 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=ijUCbTcIT/jtmdAV2iTIbrEF+VLqE151jTUbmTn58I+lZTUSUJuPfM+5XB426ZjHqh3MYVFBrw/7z9MAz1p05Q1/2ihXnUz9wNxeqZgfqeGr6XdoCM6Kamk2YNs+gOdc+YAbhgobxJYKgCjBwwCR75siN10tNIHKR9jjKr9cv9c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=jYhJmwMsFa0IjX0S95KkWTh0fpkayWUj3Nu10KNET6PYYDDYyIfaGQGaMu0cQ+yWSsEm9AYRiim4u4tkaaPbCHNQ47KHqGw2OhQYYucLA3mcqVelqxuQyXkfctaGqfMselP/t6SMxOIzs7rCPARm1Nw1XoBFu25rWE31BepBdAg= Received: by 10.64.156.3 with SMTP id d3mr7156950qbe.1174290993038; Mon, 19 Mar 2007 00:56:33 -0700 (PDT) Received: by 10.114.72.20 with HTTP; Mon, 19 Mar 2007 00:56:32 -0700 (PDT) Message-ID: Date: Mon, 19 Mar 2007 08:56:32 +0100 From: "Felix Meschberger" Sender: fmeschbe@gmail.com To: "Apache Felix Dev List" Subject: Felix Util Bundle MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 9deaccf781e564d6 X-Virus-Checked: Checked by ClamAV on apache.org Hi all, Over the last few days, I started thinking about whether it would be worth it to have some kind of Felix Util Bundle. This bundle would take all sorts of utility classes, which may be used by different bundles. In this sense this would be kind of a library bundle. The reason for this is, that there is some functionality, which is used over and over and which tends to be reimplemented repeatedly, for example: Logging Logging is defined in the LogService Specification, but it might not always be around or only be registered after first use. The simple workaround is to create a helper class, which uses the LogService if available or write to stdout/stderr otherwise. The Felix Util bundle could provide such a helper class to prevent reinventing the wheel or copying source code over and over ... Read-Only Case-Insensitive String-Key Dictionary Another common definition found all over the OSGi specs is the Dictionary which has String keys, which are treated ignoring case and in some situations are read-only (see Config Admin and Service Compontents). The Felix Util bundle could provide such a Dictionary. Requirement/Capability Abstractions Both the bundlerepository bundle and in the framework use Requirement/Capability abstractions of the [Dynamic]Import-Package and Export-Package headers. In a (currently internal) project I use the same abstraction to build a Bundle Repository Server. In providing these abstractions in the Felix Util bundle, the common functionality may be reutilized. I see two use cases for this Felix Util bundle: In the standard case of using the Felix framework, the bundle would be placed on the class path with the o.a.f.framework jar and the packages be defined as framework system packages. If using a different OSGi framework such as Equinox or Knopflerfish the Felix Util bundle may simply be deployed as another bundle. What do you think of such a util bundle ? If there is any interest I could also provide some initial implementation. Regards Felix