Return-Path: X-Original-To: apmail-aries-user-archive@www.apache.org Delivered-To: apmail-aries-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 927A19C86 for ; Fri, 13 Apr 2012 18:10:30 +0000 (UTC) Received: (qmail 15080 invoked by uid 500); 13 Apr 2012 18:10:30 -0000 Delivered-To: apmail-aries-user-archive@aries.apache.org Received: (qmail 15016 invoked by uid 500); 13 Apr 2012 18:10:30 -0000 Mailing-List: contact user-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@aries.apache.org Delivered-To: mailing list user@aries.apache.org Received: (qmail 15007 invoked by uid 99); 13 Apr 2012 18:10:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 18:10:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bertfrees@gmail.com designates 74.125.82.42 as permitted sender) Received: from [74.125.82.42] (HELO mail-wg0-f42.google.com) (74.125.82.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 18:10:14 +0000 Received: by wgbds11 with SMTP id ds11so5944801wgb.5 for ; Fri, 13 Apr 2012 11:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; bh=+T9bleLWsowpZk2JnWwc1lO0VGUA1U2SvTsiPzY95Z4=; b=QzbqJh7tQsnkdBS+a/MrnKU4eXXjXNf6tpkILT3tD1KwNirYmlzo2qAWBRcFgnc6js OX6kAar72+9jCvHLzxeLILYOdYLkkdFVME72yAB9z+NWyh3XN2fNcBlKL2au2aOud9sN 7dXJBnqMbCDz91gt1sGjPQfmobiKKoStm0RitUMNzRPLsb6/wONrXoE3mO3GQBqj29bJ FkZi/iKcZhKGX/SxT5puHpeBXd07F7qseO0WCbpQQxJuNpq10JhbeZWlSdmtNcLBnuHA Cz3Uns6CryxynB+whAsCSAEnqnT4HaxT9Bz2SL54gl+k6W+wGK8A1+FWrDuEWGBGhek7 /2QA== Received: by 10.216.132.18 with SMTP id n18mr1543490wei.81.1334340593209; Fri, 13 Apr 2012 11:09:53 -0700 (PDT) Received: from 80-219-169-58.dclient.hispeed.ch (80-219-169-58.dclient.hispeed.ch. [80.219.169.58]) by mx.google.com with ESMTPS id 6sm6393249wiz.1.2012.04.13.11.09.51 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Apr 2012 11:09:52 -0700 (PDT) Message-Id: <793D3C9E-FF9D-42EC-BA30-1FB74EA21BD7@gmail.com> From: Bert Frees To: user@aries.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: javax.imageio.spi.ServiceRegistry support in Spi Fly? Date: Fri, 13 Apr 2012 20:09:45 +0200 References: <4F8824CB.202@gmail.com> X-Mailer: Apple Mail (2.936) X-Virus-Checked: Checked by ClamAV on apache.org Thanks. I decided to upgrade to Equinox 3.7. Everything builds now. For some reason though, the services in the provider-JAR are not detected. I must be doing something wrong. I will read through the documentation again and I will let you know when I got it figured out. Thanks for all the help, Bert On 13-apr-12, at 15:27, David Bosschaert wrote: > The dynamic support requires the OSGi WeavingHook which was introduced > in Core 4.3, so that would need Equinox 3.7 or newer. > > You should be able to get things to work with the static weaving > support. I personally don't think it's a big deal, you simply run your > consumer bundle through the weaver tool, and then it should work in > Equinox 3.6 (or any other Core 4.2 compliant container). > > See the Use with Static Weaving section here: > http://aries.apache.org/modules/spi-fly.html > > The only difference between static and dynamic weaving is that with > static weaving the bytecode modifications to insert the TCCL > instructions are put in the bundle jar file, while with dynamic > weaving they are inserted at runtime before the class is loaded. > > Hope this helps, > > David > > On 13 April 2012 14:06, Bert Frees wrote: >> Thanks for the help! I guess I should've had a better look at the >> documentation :) >> >> Now I hit the following problem: the requirement "org.osgi.framework >> [1.6.0,2.0.0)" cannot be satisfied. The project I'm working on uses >> Equinox >> 3.6.1... Do we need to update to a newer version or is there >> another way >> around it (apart from using the static bundle)? >> >> Thanks, >> Bert >> >> >> >> On 04/13/2012 08:29 AM, David Bosschaert wrote: >>> >>> Hi Bert, >>> >>> Yes, although I haven't tried it with this particular API, it >>> should work. >>> >>> Assuming that the method in that class you will be using is >>> lookupProviders() you'd specify as a manifest header in the consumer >>> bundle: >>> SPI-Consumer: javax.imageio.spi.ServiceRegistry#lookupProviders >>> >>> On the provider side it should be enough to specify the following >>> manifest header: >>> SPI-Provider: * >>> >>> Let us know how you get on! >>> >>> Best regards, >>> >>> David >>> >>> On 12 April 2012 20:03, Bert Frees wrote: >>>> >>>> Hello, >>>> >>>> I'm interested in using Spi Fly in my project. I would like to >>>> make an >>>> OSGi >>>> bundle out of a JAR. Because the JAR was built for Java 1.5, it >>>> uses >>>> javax.imageio.spi.ServiceRegistry instead of >>>> java.util.ServiceLoader. >>>> Will >>>> Spi Fly treat ServiceRegistry.lookupProviders() calls the same >>>> way it >>>> treats >>>> ServiceLoader.load() calls? >>>> >>>> Thanks, >>>> /Bert >> >>