Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD19B1039A for ; Sun, 2 Jun 2013 07:55:18 +0000 (UTC) Received: (qmail 57391 invoked by uid 500); 2 Jun 2013 07:55:17 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 56935 invoked by uid 500); 2 Jun 2013 07:55:17 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 56926 invoked by uid 99); 2 Jun 2013 07:55:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jun 2013 07:55:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of brown@reflexe.fr designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jun 2013 07:55:10 +0000 Received: by mail-we0-f172.google.com with SMTP id q56so816800wes.3 for ; Sun, 02 Jun 2013 00:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=reflexe.fr; s=reflexe; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=v1LTqyF/WpgGvMzbC+dS4ScCzRlVVlrqzA6vJxVdbXg=; b=IEnF7jE52F1gVNoMcFO1zgz4s9GXaOSImyfb/a6l6PdTySd87tiiAeNk3XR+7d/nh8 psmiVv6Ab/ATkwBedudxpKylIs418WFw4fw4vGHwXGrOiPN85FQRHHjyMENZX31ARs2u j9mma/8jrxSBV6+1pVn+q8iJcC5/lLDVltkrs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=v1LTqyF/WpgGvMzbC+dS4ScCzRlVVlrqzA6vJxVdbXg=; b=h54VALXLx/hzniFCbGltbaHDpyO359Fwez0srcvWzsdg4ujON3JbqLe6dONdaKWS6S o+c78EHkDc70W+Wpb9CZWQk0e9q8IJ36ex4A90EWYNQZuSlM5bx8yGXaJaJbLBb+yBeV cIbSGIWDQa3S21COPC/dlzq1TxOatIel9Tf+LR1Hz4ELKvfyJkMXhg7/jVroD858Nx7x DRURqE7pMmHqZpozaZrvc6anfADltcv4gaegJRpjl9Fl1oNOCLsDv49fw5Ejudl5p3kk bIm4VtmWASwhUVcspklTZ+DhN5GjTkZnd4s9facqxd6RHpIh+R1d+jf4uP+VqPPXBsZy UdKQ== X-Received: by 10.180.72.227 with SMTP id g3mr8883698wiv.1.1370159689979; Sun, 02 Jun 2013 00:54:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.76.205 with HTTP; Sun, 2 Jun 2013 00:54:09 -0700 (PDT) In-Reply-To: References: <1370038233657-5003596.post@n6.nabble.com> From: Christopher BROWN Date: Sun, 2 Jun 2013 09:54:09 +0200 Message-ID: Subject: Re: declarative Services To: users@felix.apache.org Content-Type: multipart/alternative; boundary=f46d043c81929b68d004de27290c X-Gm-Message-State: ALoCoQmcEaAIGWqA35JMijgS96cNNFJUXvaNRIDKXEyQr4ROP8d/FFBIFXwwGHrHIcPR/8B1FgzR X-Virus-Checked: Checked by ClamAV on apache.org --f46d043c81929b68d004de27290c Content-Type: text/plain; charset=UTF-8 Hi Peter, Isn't that a bit like asserting that you only ever need functional programming, and not OOP or any other imperative style? I would tend to agree with your assertion, where DS is the best fit solution for most use cases, but having the bundle activator is nice in order to handle edge cases. -- Christopher On 1 June 2013 11:27, Peter Kriens wrote: > If I had to start over with the design of OSGi there would be no bundle > activator, just DS components ... The activator was a mistake since it is a > singleton and I now sometimes wonder what we are smoking, forcing people to > handle their own service dependencies. DS's support services, service > factories, and more as well as fully handling service dependencies makes > services as lightweight as classes. With the DS annotations you can turn ay > class into a service (factory) whenever you want, not requiring any extra > setup. I found it amazing how light weight services became once I could do > this. > > You can control the life cycle of the component with config admin using > managed service (factories). Config admin can define/override service > properties and define which service dependencies are bound by setting the > target filter. > > With DS you do not need the dependency manager since DS handles deps for > you. > > Again, OSGi was not complete until DS was specified. > > Kind regards, > > Peters Kriens --f46d043c81929b68d004de27290c--