Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Alain Picard via osgi-dev
Thanks! I actually saw that being called by ComponentServiceObjects while perusing the code. Alain On Wed, Aug 22, 2018 at 11:52 AM Tim Ward wrote: > Registering a prototype service is almost as easy as registering a > singleton service. Instead of registering a single object you register an

[osgi-dev] Retrieving service configuration implementation in reference method

2018-08-22 Thread Alain Picard via osgi-dev
In a reference method, i can get the property configuration of the service along with the ComponentFactory and some other optional arguments. Can any of those give me a way to retrieve the implementation from the configuration (i.e. the class name of the implementation) ? Thanks Alain

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Tim Ward via osgi-dev
Registering a prototype service is almost as easy as registering a singleton service. Instead of registering a single object you register an instance of PrototypeServiceFactory . This will get called by the

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Alain Picard via osgi-dev
Tim, This helps quite a bit and clarifies a few points for me. As someone who is migrating from a pre-DS environment and dealing with lots of legacy, how can prototype scoped services be used outside of DS? That would be fantastic. Right now we have a good solution to use singleton services

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Tim Ward via osgi-dev
Hi Alain, A "Prototype scoped" service is one where the client(s) can request an arbitrary number of instances of the “same” service, whereas a ComponentFactory is a mechanism for the clients to request an arbitrary number of differently configured component instances. From the perspective of

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Alain Picard via osgi-dev
On the 2nd part of the question regarding ComponentFactory/ComponentInstance vs Prototype/ComponentServiceObjects. I get the feeling that CSO should be favored, but I saw an old post from Scott Lewis about configuration and that is a bit close to some of my use cases. I have cases where I have a

Re: [osgi-dev] Disposing component instances

2018-08-22 Thread Tim Ward via osgi-dev
> On 21 Aug 2018, at 20:53, Paul F Fraser via osgi-dev > wrote: > > On 22/08/2018 5:40 AM, Paul F Fraser via osgi-dev wrote: >> On 21/08/2018 10:00 PM, Tim Ward via osgi-dev wrote: >>> Have you looked at what the OSC project does? It uses Vaadin, and uses the >>> ViewProvider interface to