You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Michael Szalay <mi...@gmail.com> on 2009/09/14 17:45:10 UTC

Configuration Admin Question

Hi all

I want to use ConfigurationAdmin in the following way:

Bundle A is a ManagedService and has properties.

Bundle B is an administrator that can read and write the configuration 
of Bundle A.

I can read and write the configuration using Bundle B, but its not used 
because of

"Cannot use configuration for A requested by bundle A but belongs to B"

I understand that messages in the way that only bundle A can write his 
own configuration.

How can I make the configuration service to use the configuration 
written by bundle B?

Thanks

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Configuration Admin Question

Posted by Michael Szalay <mi...@gmail.com>.
Works perfectly!

Thanks

Neil Bartlett schrieb:
> You need to call the two-argument version of getConfiguration(),
> passing null as the second argument (i.e., the "location"). If you
> just call the single-argument version, the configuration object will
> be "bound" to the calling bundle.
>
> Regards,
> Neil
>
> On Mon, Sep 14, 2009 at 4:45 PM, Michael Szalay
> <mi...@gmail.com> wrote:
>   
>> Hi all
>>
>> I want to use ConfigurationAdmin in the following way:
>>
>> Bundle A is a ManagedService and has properties.
>>
>> Bundle B is an administrator that can read and write the configuration of
>> Bundle A.
>>
>> I can read and write the configuration using Bundle B, but its not used
>> because of
>>
>> "Cannot use configuration for A requested by bundle A but belongs to B"
>>
>> I understand that messages in the way that only bundle A can write his own
>> configuration.
>>
>> How can I make the configuration service to use the configuration written by
>> bundle B?
>>
>> Thanks
>>
>> Michael
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Configuration Admin Question

Posted by Neil Bartlett <nj...@gmail.com>.
You need to call the two-argument version of getConfiguration(),
passing null as the second argument (i.e., the "location"). If you
just call the single-argument version, the configuration object will
be "bound" to the calling bundle.

Regards,
Neil

On Mon, Sep 14, 2009 at 4:45 PM, Michael Szalay
<mi...@gmail.com> wrote:
> Hi all
>
> I want to use ConfigurationAdmin in the following way:
>
> Bundle A is a ManagedService and has properties.
>
> Bundle B is an administrator that can read and write the configuration of
> Bundle A.
>
> I can read and write the configuration using Bundle B, but its not used
> because of
>
> "Cannot use configuration for A requested by bundle A but belongs to B"
>
> I understand that messages in the way that only bundle A can write his own
> configuration.
>
> How can I make the configuration service to use the configuration written by
> bundle B?
>
> Thanks
>
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org