There is no way to ask the framework for all instances of a prototype scoped service.
If you need such support, you would need to make sure your PrototypeServiceFactory implementations provide it as they create the instances and can track and update them if needed with new configuration information.
--
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and OSGi Specification Project lead // mobile: +1 386 848 3788
hargrave@xxxxxxxxxx
----- Original message -----
From: "Alain Picard" <picard@xxxxxxxxxxxxxx>
Sent by: "osgi-users" <osgi-users-bounces@xxxxxxxxxxx>
To: "This is a community mail list for OSGi technology. Any OSGi technical discussion or questions are acceptable here." <osgi-users@xxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] [osgi-users] Retrieving/Tracking all instances of Prototype service
Date: Fri, Oct 1, 2021 07:14
Hi,
I'm looking for a way to either register all instances of a prototype service or to retrieve them when needed. Here I need to call those active service instances with some change configuration.
In many cases, we have factories that manage the instance pool when this is required, but here I just need to get the instances and provide them with updated configuration.
Thanks
Alain