Hello JB.
I've tried with a ServiceListener that also seems to match my need. The
ConfigurationListener seems not to be very different, but a bit more
verbose I think. With the service listener I immediately get the
"managed" service reference. What do you think about this option ?
Thanks a
Hi,
You can use a ConfigListener, similar to what we do in Cellar Config:
https://github.com/apache/karaf-cellar/blob/main/config/src/main/java/org/apache/karaf/cellar/config/LocalConfigurationListener.java
Regards
JB
On Thu, Nov 30, 2023 at 9:19 AM Ephemeris Lappis
wrote:
>
> Hello.
>
> To ma
Hello Matt
I've finally chosen to use a simple ServiceListener on one of the
services that already uses my managed services. I register the main
service component itself as a listener with a filter on the needed
interface, and when an instance is registered, modified or
unregistered, it applies th
Hi Ephemeris-
OSGi has several hooks you can use. Look into OSGi's EventHandler and
ServiceTracker
Additionally, you can make another service that takes this service in as a
reference, then you get called when the service is added and removed.
Look into OSGi component services, and bind/unbind
Hi
On the first glance a ServiceTracker might achieve what you want.
Best regards
Stephan
-Original Message-
From: Ephemeris Lappis
Sent: Thursday, 30 November 2023 09:19
To: user@karaf.apache.org
Subject: OSGi managed service factory / Events on changes ?
Hello.
To manage some kind
Hello.
To manage some kind of dynamic configuration, I've used a managed
service factory. It works as expected, and I can add, update or remove
instances deploying or undeploying files in the etc folder.
The simple blueprint is like that :
http://www.osgi.org/xmlns/blueprint/v1.0.0";
xmlns:cm="