You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Andrei Pozolotin <an...@gmail.com> on 2011/10/07 03:01:04 UTC

scr enableComponent with properties?

    Hello again;

    Can you please clarify:

    is there a way to issue scr enableComponent() or equivalent:
    http://www.osgi.org/javadoc/r4v401/org/osgi/service/component/ComponentContext.html#enableComponent%28java.lang.String%29

    with properties Map<String, String> config, which would be injected
    into the target activate(Map<String, String> config) method?

    ?

    Thank you,

    Andrei 


Re: scr enableComponent with properties?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

If you use factory components you provide the properties to the newInstance() method...

Regards
Felix

Am 08.10.2011 um 02:31 schrieb Andrei Pozolotin:

> 
> 
>    Felix:
> 
>    yes, I am using factory components for this,
>    I just felt like enableComponent(props) would be a nice feature to have :-)
> 
>    thank you!
> 
>    Andrei
> 
> 
> 
> -------- Original Message  --------
> Subject: Re: scr enableComponent with properties?
> From: Felix Meschberger <fm...@adobe.com>
> To: users@felix.apache.org <us...@felix.apache.org>
> Date: Fri 07 Oct 2011 05:43:26 PM CDT
>> Hi,
>> 
>> No, this is not foreseen. Configuration is intended to come from Configuration Admin (and properties defined in the descriptor). If you want to instantiate components yourself with custom properties, you might want to consider factory components.
>> 
>> Regards
>> Felix
>> 
>> Am 07.10.2011 um 03:01 schrieb Andrei Pozolotin:
>> 
>> 
>>>   Hello again;
>>> 
>>>   Can you please clarify:
>>> 
>>>   is there a way to issue scr enableComponent() or equivalent:
>>>   http://www.osgi.org/javadoc/r4v401/org/osgi/service/component/ComponentContext.html#enableComponent%28java.lang.String%29
>>> 
>>>   with properties Map<String, String> config, which would be injected
>>>   into the target activate(Map<String, String> config) method?
>>> 
>>>   ?
>>> 
>>>   Thank you,
>>> 
>>>   Andrei 
>>> 
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> 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: scr enableComponent with properties?

Posted by Andrei Pozolotin <an...@gmail.com>.

    Felix:

    yes, I am using factory components for this,
    I just felt like enableComponent(props) would be a nice feature to have :-)

    thank you!

    Andrei

      

-------- Original Message  --------
Subject: Re: scr enableComponent with properties?
From: Felix Meschberger <fm...@adobe.com>
To: users@felix.apache.org <us...@felix.apache.org>
Date: Fri 07 Oct 2011 05:43:26 PM CDT
> Hi,
>
> No, this is not foreseen. Configuration is intended to come from Configuration Admin (and properties defined in the descriptor). If you want to instantiate components yourself with custom properties, you might want to consider factory components.
>
> Regards
> Felix
>
> Am 07.10.2011 um 03:01 schrieb Andrei Pozolotin:
>
>   
>>    Hello again;
>>
>>    Can you please clarify:
>>
>>    is there a way to issue scr enableComponent() or equivalent:
>>    http://www.osgi.org/javadoc/r4v401/org/osgi/service/component/ComponentContext.html#enableComponent%28java.lang.String%29
>>
>>    with properties Map<String, String> config, which would be injected
>>    into the target activate(Map<String, String> config) method?
>>
>>    ?
>>
>>    Thank you,
>>
>>    Andrei 
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>   


Re: scr enableComponent with properties?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

No, this is not foreseen. Configuration is intended to come from Configuration Admin (and properties defined in the descriptor). If you want to instantiate components yourself with custom properties, you might want to consider factory components.

Regards
Felix

Am 07.10.2011 um 03:01 schrieb Andrei Pozolotin:

>    Hello again;
> 
>    Can you please clarify:
> 
>    is there a way to issue scr enableComponent() or equivalent:
>    http://www.osgi.org/javadoc/r4v401/org/osgi/service/component/ComponentContext.html#enableComponent%28java.lang.String%29
> 
>    with properties Map<String, String> config, which would be injected
>    into the target activate(Map<String, String> config) method?
> 
>    ?
> 
>    Thank you,
> 
>    Andrei 
> 


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