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 157539D91 for ; Fri, 13 Apr 2012 18:56:56 +0000 (UTC) Received: (qmail 35632 invoked by uid 500); 13 Apr 2012 18:56:55 -0000 Delivered-To: apmail-aries-user-archive@aries.apache.org Received: (qmail 35587 invoked by uid 500); 13 Apr 2012 18:56:55 -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 35578 invoked by uid 99); 13 Apr 2012 18:56:55 -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:56:55 +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 david.bosschaert@gmail.com designates 209.85.210.48 as permitted sender) Received: from [209.85.210.48] (HELO mail-pz0-f48.google.com) (209.85.210.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 18:56:49 +0000 Received: by dadp12 with SMTP id p12so3853946dad.35 for ; Fri, 13 Apr 2012 11:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=e7/26jCudTjZVTfhzMIXvjffCj7i4z6tkghddFlZU/4=; b=Ug/z+fulIaksiAQ6brAOwvgXeQtL53SJStS3ICdDAvtsFCT9TP9zsvRG4Jkfa14Q8c RCiY8wD/81JNgjr1y/Asac1xDoJe7UuIWVwPlcMecUit4M5EQzVnC6A9ABU6HYpdtGHE IPyB2C3YqJR6GvB697dVmaB9paieWGfoBGpw5Sfzo/Cj31ltPxpvuS/LMVX6E6YOI9cg ir/zHXNWLwoWF+gbdhDRzNB1U5vtrsnCdnXd7PDA3GpPWM7XXkPq9FTREDdCGAci2WFS Jnbrq6wIgNGIGURmQYaRPTFRE6TE5ExIIAnxANxd+g5xxN/7Vm4iNjydwniNKTQH6XoZ CJWQ== Received: by 10.68.138.197 with SMTP id qs5mr4517223pbb.100.1334343388851; Fri, 13 Apr 2012 11:56:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.11.21 with HTTP; Fri, 13 Apr 2012 11:56:08 -0700 (PDT) In-Reply-To: <793D3C9E-FF9D-42EC-BA30-1FB74EA21BD7@gmail.com> References: <4F8824CB.202@gmail.com> <793D3C9E-FF9D-42EC-BA30-1FB74EA21BD7@gmail.com> From: David Bosschaert Date: Fri, 13 Apr 2012 19:56:08 +0100 Message-ID: Subject: Re: javax.imageio.spi.ServiceRegistry support in Spi Fly? To: user@aries.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I haven't tried it with this particular API, but did play with it in the context of the sun.misc.Service API (which I believe is used as an implementation of the API you're using). In that case it was indeed needed to do something special (although I can't quite remember what it was ;). If you can share a small test scenario of what you're trying to do I would be happy to take a look. Cheers, David On 13 April 2012 19:09, Bert Frees wrote: > Thanks. I decided to upgrade to Equinox 3.7. Everything builds now. For s= ome > 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 wa= y >>> 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 =A0wrote: >>>>> >>>>> >>>>> Hello, >>>>> >>>>> I'm interested in using Spi Fly in my project. I would like to make a= n >>>>> 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 >>> >>> >>> >