Hi Aruna,

ARIES-953 is fixed in SPI-Fly 1.0.4, I see that you're still on 1.0.2.
Why not get the latest release [1] and try that? The latest release is 1.0.6...

Best regards,

David

[1] http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.aries.spifly%22

On 24 November 2015 at 01:00, Aruna Karunarathna <[email protected]> wrote:
>
> Sorry for the buzz.
> Seems like when a method having more than one parameter it's broken.
>
> For no parameter and one parameter its working perfectly. Not sure there is
> a connection to [1], since I'm using version 1.0.2.
>
> [1]. https://issues.apache.org/jira/browse/ARIES-953
>
> On Tue, Nov 24, 2015 at 12:22 PM, Aruna Karunarathna <[email protected]>
> wrote:
>>
>> Hi Devs,
>>
>> When using apache aries for enable spi-fly I cant call the methods with
>> parameters for dynamic weaving. Following is the bundle list I've used.
>>
>> org.apache.aries.spifly.dynamic.bundle-1.0.2.jar
>> asm-all-5.0.4.jar
>> org.apache.aries.util-1.1.1.jar
>>
>> and following headers in my pom.xml in maven bundle plugin
>>
>>
>> <SPI-Consumer>org.apache.aries.spifly.examples.client2.impl.Activator#getSpiProvider(java.lang.String,
>> java.lang.String)</SPI-Consumer>
>>
>>
>> <SPI-Provider>org.apache.aries.spifly.examples.client2.impl.Activator</SPI-Provider>
>>
>> I tried to read
>> /META-INF/services/org.apache.aries.spifly.mysvc.SPIProvider
>>
>> public static SPIProvider getSpiProvider(final String factoryId, final
>> String fallbackClassName){
>>
>>         ClassLoader classLoader =
>> Thread.currentThread().getContextClassLoader();
>>
>>         String serviceId = "META-INF/services/" +
>> "org.apache.aries.spifly.mysvc.SPIProvider";
>>         URL r =
>> Thread.currentThread().getContextClassLoader().getResource(serviceId);
>>         System.out.println("*** Found resource: " + r);
>>         System.out.println("*** First line of content: " + new
>> BufferedReader(new InputStreamReader(r.openStream())).readLine());
>>
>>         //return null for the moment
>>         return null;
>>
>>     }
>>
>> If I remove the parameters from the getSpiProvider method and change the
>> SPI-Consumer to the following maven-bundle-plugin entry in pom.xml
>>
>>
>> <SPI-Consumer>org.apache.aries.spifly.examples.client2.impl.Activator#getSpiProvider()</SPI-Consumer>
>>
>> Any idea what went wrong here?. Can't we use methods with parameters for
>> weaving?
>>
>> Regards,
>> Aruna
>> --
>
>
>
>
> --
>
> Aruna Sujith Karunarathna
> WSO2 Inc | lean. enterprise. middleware.
> #20, Palm Grove, Colombo 03, Sri Lanka
> Mobile: +94 71 9040362 | Work: +94 112145345
> Email: [email protected] | Web: www.wso2.com

Reply via email to