karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Work-around for Cellar not supporting blueprint managed-service factory replication
Date Tue, 11 Jul 2017 04:13:21 GMT
Hi Steve,

I created a Jira about that while ago.

The idea in Cellar Config is to detect factory PID and then replicate the config 
correctly.

It won't be included in Cellar 4.1.1,  but I can include that for 4.1.2 release.

Regards
JB

On 07/11/2017 02:28 AM, steve.lombardi wrote:
> To the Karaf team:
> 
> 1. We understand that managed-service factories *are not* recommended for
> use by Jean
> (http://karaf.922171.n3.nabble.com/Sharing-configuration-with-Cellar-td4037365.html).
> 
> 2. That being said, we understand Cellar will replicate the configurations
> but will not create the factory itself. We tried the reproduction steps
> (http://karaf.922171.n3.nabble.com/Problem-with-Cellar-and-ManagedServiceFactories-td4037937.html)
> and they *did not* work with Karaf 4.1.1 and Cellar 4.1.0 using default
> property excludes (including factory.pid).
> 
> Do our blueprint bundles need to do something special? Do they need to
> pre-create the factories in the container so Cellar config sync works
> correctly? I don't think so; it won't work anyway.
> 
> Cellar does not call configurationAdmin.createFactoryConfiguration(), it
> instead calls configurationAdmin.getConfiguration() with a PID that
> represents a managed-service factory instance (e.g. factoryPID-UUID).
> 
> The end result is that the bean registered with blueprint is never
> instantiated, even if other beans were instantiated belonging to that
> factory. The steps cited here
> (http://karaf.922171.n3.nabble.com/Problem-with-Cellar-and-ManagedServiceFactories-td4037937.html)
> would never work with a blueprint bundle that uses
> <cm:managed-service-factory> and <cm:managed-component>.
> 
> Do we need to provide our own implementation of ManagedServiceFactory
> (https://osgi.org/javadoc/r4v42/org/osgi/service/cm/ManagedServiceFactory.html)
> to offset how blueprint does it
> (https://github.com/apache/aries/blob/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/BaseManagedServiceFactory.java#L38)
> if we want Cellar to work?
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Work-around-for-Cellar-not-supporting-blueprint-managed-service-factory-replication-tp4050981.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message