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
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
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
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