karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter GardfjÀll <peter.gardfjall.w...@gmail.com>
Subject Best practice on propagating configuration errors from ManagedFactoryService to client?
Date Mon, 30 Jan 2012 08:24:50 GMT
Hi all,

thought I'd ask this general OSGi question on this list full of
OSGi-knowledgeable people.
Please tell me if it belongs better on a more OSGi-standard specific forum
(such as Felix/Equinox perhaps).

So I have a ManagedFactoryService that creates service instances and I have
another (client-)bundle that creates instances by registering new
configurations with the factory.
What I currently find difficult is to propagate errors (such as a required
configuration property missing) from the ManagedFactoryService to the

When the client uses an invalid configuration dictionary to instantiate a
new service instance as follows

        // instantiate new service with serviceConfig as instantiation
        Configuration config =
configurationAdmin.createFactoryConfiguration(factoryPid, null);

no exception is raised despite the ManagedFactoryService throwing a
I guess this is expected since configuration updates are handled on a
separate thread of execution.
But this is problematic since, from the client bundle's perspective, the
configuration update appears to have been successful.

So what I really need to know is if there is a best practice for
propagating the configuration error from the ManagedFactoryService to the
Any suggestions would be appreciated.

best regards, Peter

View raw message