Re: [osgi-dev] Problem with configuration admin

2017-06-05 Thread Fauth Dirk (AA-AS/EIS2-EU)
If you talk about my blog post then first thanks! :)

But the blog post is intended to be a tutorial to go through step-by-step to 
get familiar with the topic. Mentioning the "two-parameter getConfiguration" at 
the beginning would be confusing.

And yes, it is not obvious and I had issues with that myself in the beginning. 
One of the reasons for the tutorials.

Mit freundlichen Grüßen / Best regards

 Dirk Fauth

Automotive Service Solutions, ESI application (AA-AS/EIS2-EU) 
Robert Bosch GmbH | Postfach 11 29 | 73201 Plochingen | GERMANY | www.bosch.com
Tel. +49 7153 666-1155 | dirk.fa...@de.bosch.com

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000; 
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar 
Denner, 
Prof. Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr. 
Markus Heyn, Dr. Dirk Hoheisel,
Christoph Kübel, Uwe Raschke, Peter Tyroller


-Ursprüngliche Nachricht-
Von: osgi-dev-boun...@mail.osgi.org [mailto:osgi-dev-boun...@mail.osgi.org] Im 
Auftrag von chris.g...@kiffer.be
Gesendet: Montag, 5. Juni 2017 21:00
An: OSGi Developer Mail List 
Betreff: Re: [osgi-dev] Problem with configuration admin

It's very useful. But the bit about the "two-parameter getConfiguration method 
using null (no location) as the second parameter" should maybe be mentioned 
from the start, because it's not at all obvious and I remember getting bitten 
by this myself a few years back.

> Hi,
>
> I wrote a blog post about configuring services a while ago.
>
> http://blog.vogella.com/2016/09/26/configuring-osgi-declarative-servic
> es/
>
> Maybe it helps to understand it better.
>
> Greez,
> Dirk
>
> Am 04.06.2017 14:02 schrieb "Mark Raynsford" :
>
>> On 2017-06-04T13:04:12 +0200
>> Felix Meschberger  wrote:
>>
>> > Hi Mark
>> >
>> > I assume your configurator is creating the configuraiton with:
>> >
>> > >final Configuration config =
>> > >  this.configurations.getConfiguration(
>> > >"com.io7m.callisto.stringtables.main.provider“)
>> >
>> > If this is the case, this new configuration is bound to the
>> configurator’s bundle, which IIUIC is the same bundle also 
>> containing the Example component.
>>
>> I see.
>>
>> > Thus the Example component gets the configuration being in the same
>> bundle, but the provider does not as it is in another bundle.
>> >
>> > You might want to try to use the two-parameter getConfiguration 
>> > method
>> using null (no location) as the second parameter to make sure the 
>> configuration is not bound at the time of creation — but later when 
>> it is first provided to the consumer
>> >
>>
>> Yes, this worked! Thanks.
>>
>> I have to admit, I'm not exactly sure what's happening here. The R6 
>> compendium spec mentions that location binding is a security feature 
>> (104.4.1), but it then uses terms like "management bundle" without 
>> actually explaining what that is.
>>
>> M
>>
>> ___
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Problem with configuration admin

2017-06-05 Thread chris . gray
It's very useful. But the bit about the "two-parameter getConfiguration
method using null (no location) as the second parameter" should maybe be
mentioned from the start, because it's not at all obvious and I remember
getting bitten by this myself a few years back.

> Hi,
>
> I wrote a blog post about configuring services a while ago.
>
> http://blog.vogella.com/2016/09/26/configuring-osgi-declarative-services/
>
> Maybe it helps to understand it better.
>
> Greez,
> Dirk
>
> Am 04.06.2017 14:02 schrieb "Mark Raynsford" :
>
>> On 2017-06-04T13:04:12 +0200
>> Felix Meschberger  wrote:
>>
>> > Hi Mark
>> >
>> > I assume your configurator is creating the configuraiton with:
>> >
>> > >final Configuration config =
>> > >  this.configurations.getConfiguration(
>> > >"com.io7m.callisto.stringtables.main.provider“)
>> >
>> > If this is the case, this new configuration is bound to the
>> configurator’s bundle, which IIUIC is the same bundle also containing
>> the
>> Example component.
>>
>> I see.
>>
>> > Thus the Example component gets the configuration being in the same
>> bundle, but the provider does not as it is in another bundle.
>> >
>> > You might want to try to use the two-parameter getConfiguration method
>> using null (no location) as the second parameter to make sure the
>> configuration is not bound at the time of creation — but later when it
>> is
>> first provided to the consumer
>> >
>>
>> Yes, this worked! Thanks.
>>
>> I have to admit, I'm not exactly sure what's happening here. The R6
>> compendium spec mentions that location binding is a security feature
>> (104.4.1), but it then uses terms like "management bundle" without
>> actually explaining what that is.
>>
>> M
>>
>> ___
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev