servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Edstrom <seij...@gmail.com>
Subject Re: Prototype scope doesn't work with osgi:service
Date Mon, 05 Sep 2011 18:16:22 GMT
True :)

A Managed Service Factory would work though….
Not exactly the same thing since the starting bundle would hold more responsibility.



On Sep 5, 2011, at 12:08 PM, Guillaume Nodet wrote:

> The factory result is cached by the framework on a per bundle basis.
> 
> On Monday, September 5, 2011, Johan Edstrom <seijoed@gmail.com> wrote:
>> Use a servicefactory.
>> 
>> On Sep 5, 2011, at 6:24 AM, Sorin Silaghi wrote:
>> 
>>> Hi all,
>>> 
>>> 
>>>           I need to declare a service that has scope="prototype" but it
>>> doesn't seem to work. Here's what I did:
>>> 
>>> <bean id="randomFileListFTPClient"
>>> class="de.edigrid.util.servicemix.strategy.RandomFileListFTPClient"
>>> scope="prototype"/>
>>> <osgi:service id="randomFileListFTPClientService"
>>> ref="randomFileListFTPClient"
>>> interface="org.apache.commons.net.ftp.FTPClient" />
>>> 
>>> 
>>>           I also tried scope="bundle" and it's the same thing. I
> expected
>>> that to work. Any ideas ?
>>> 
>>> 
>>> thank you,
>>>               Sorin.
>> 
>> 
> 
> -- 
> ------------------------
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com


Mime
View raw message