I don't think I understand many details of what you are trying to do… but….  it 
looks like you have two MSF/MS/configured DS component in different bundles 
that are using the same PID.  Without doing something, only the first will 
actually be able to use the configuration.  The first bundle to get the config 
will get the location set to its location, and other bundles won't be able to 
see the configuration.

If you really intend to share the configuration across several bundles, you 
need to use a recent CA and use region support.  For instance set the 
configuration location to "?" and all bundles will be able to use the same 
configuration.

hope this helps even though I don't understand what you are trying to do.
david jencks

On Sep 3, 2013, at 11:03 AM, Felix Meschberger <[email protected]> wrote:

> Hi
> 
> Am 03.09.2013 um 08:45 schrieb Roland:
> 
>> I can definitly say that I have a some kind of racecondition.
>> My bundle creates one configuration for a MSF bounded to the same location,
>> and also some configurations bounded to other locations. Only those
>> configuration is updated by the CA which was detected first. The sequence is
>> not predictable.
>> 
>> Thread 1
>> config = confAdmin.createFactoryConfiguration(factoryPIDintern);
>> config.update(properties0);
>> ...
>> 
>> Thread 2
>> config = confAdmin.createFactoryConfiguration(factoryPIDextern, null);
>> config.update(properties1);
>> ...
>> config = confAdmin.createFactoryConfiguration(factoryPIDextern, null);
>> config.update(properties2);
>> ...
>> config = confAdmin.createFactoryConfiguration(factoryPIDextern, null);
>> config.update(properties3);
>> ...
>> 
>> 
>> What I get is something like this:
>> "Cannot use configuration factoryPIDextern for
>> [org.osgi.service.cm.ManagedServiceFactory, id=52,
>> bundle=46/file:/externallocation]: No visibility to configuration bound to
>> file:/internallocation"
>> ...
> 
> It looks like a bundle whose location is "file:/internallocation" registered 
> a ManagedServiceFactory which already got the factoryPIDextern configuration 
> and thus this configuration is thus wired to that bundle.
> 
> Regards
> Felix
> 
>> 
>> My Permissions
>> (org.osgi.framework.ConfigurationPermission * configure)
>> (org.osgi.framework.AdminPermission * metadata)
>> 
>> What the spec. says:
>> "...The calls to the updated method of a ManagedServiceFactory must be
>> executed sequentially and not overlap in time. ..."
>> 
>> Am I right in thinking that I need to synchronize with the CA?
>> What else am I doing wrong?
>> 
>> Thanks & Regards
>> 
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://apache-felix.18485.x6.nabble.com/OSGI-Configuration-cannot-take-effect-immediately-tp4833849p5004799.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to