servicemix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@gmail.com>
Subject Re: Prototype scope doesn't work with osgi:service
Date Mon, 05 Sep 2011 12:36:05 GMT
What kind of behavior do you expect ?
OSGi does not support a per-invocation creation so a single service
(or possibly one per calling bundle) is created.
If you looking for a per-invocation proxy, maybe using a spring proxy
would help.

On Mon, Sep 5, 2011 at 14:24, Sorin Silaghi <sorin7486@gmail.com> 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