You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by re...@orange.com on 2011/12/20 11:34:44 UTC

Setting and getting properties in iPojo

Hello,

I'd like to know if there is an easy way to set and get properties of a component by another one (in a different bundle, assuming this is iPojo that validate/invalidate each component). In a short way, I'd like to have a component that is able to introspect another component as soon as its instance is created (but before the validation) and set some properties and get those properties (assuming they changed) after the invalidation (and before any destruction on the instance).

Thanks

Regards,
--
Rémi Druilhe

RE : Setting and getting properties in iPojo

Posted by re...@orange.com.
Hi,

This seems to be the feature I was looking for. I will try to learn more about it and try it to see if it fits :-)

Thanks,

Regards.


-------- Message d'origine--------
De: Clement Escoffier [mailto:clement.escoffier@gmail.com]
Date: mer. 21/12/2011 16:39
À: users@felix.apache.org
Objet : Re: Setting and getting properties in iPojo
 

On 21.12.2011, at 16:33, Richard S. Hall wrote:

> On 12/21/11 08:16 , remi.druilhe@orange.com wrote:
>> I'd not like to use a handler because a developper would need to declare it in each components (and this is a handler that will be declared in each components). That seems very intrusive for me. Instead, I'd like a component that is able to introspect, through Ipojo, the properties of another component and set some properties if needed. That seems less intrusive for me because the developper doesn't need to care about this aspect. But the Ipojo API doesn't seems to let me do that easily :-/
> 
> I thought that iPOJO let you automatically attach handlers to components too.Clement?

Yes, there is a system property (org.apache.felix.ipojo.handler.auto.primitive) letting you attaching handlers to all (primitive) instances. The value is a comma separated list. Each element is the fully qualified name of the handler (namespace:name).

Regards,

Clement

> 
> -> richard
> 
> 
>> 
>> --
>> Rémi Druilhe
>> 
>> -------- Message d'origine--------
>> De: Richard S. Hall [mailto:heavy@ungoverned.org]
>> Date: mar. 20/12/2011 14:34
>> À: users@felix.apache.org
>> Objet : Re: Setting and getting properties in iPojo
>> 
>> Not sure, but it sounds like more of a job for a custom handler than a
>> component.
>> 
>> Maybe Clement has better advice...
>> 
>> ->  richard
>> 
>> On 12/20/11 05:34 , remi.druilhe@orange.com wrote:
>>> Hello,
>>> 
>>> I'd like to know if there is an easy way to set and get properties of a component by another one (in a different bundle, assuming this is iPojo that validate/invalidate each component). In a short way, I'd like to have a component that is able to introspect another component as soon as its instance is created (but before the validation) and set some properties and get those properties (assuming they changed) after the invalidation (and before any destruction on the instance).
>>> 
>>> Thanks
>>> 
>>> Regards,
>>> --
>>> Rémi Druilhe
>>> 
>> ---------------------------------------------------------------------
>> 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: Setting and getting properties in iPojo

Posted by Clement Escoffier <cl...@gmail.com>.
On 21.12.2011, at 16:33, Richard S. Hall wrote:

> On 12/21/11 08:16 , remi.druilhe@orange.com wrote:
>> I'd not like to use a handler because a developper would need to declare it in each components (and this is a handler that will be declared in each components). That seems very intrusive for me. Instead, I'd like a component that is able to introspect, through Ipojo, the properties of another component and set some properties if needed. That seems less intrusive for me because the developper doesn't need to care about this aspect. But the Ipojo API doesn't seems to let me do that easily :-/
> 
> I thought that iPOJO let you automatically attach handlers to components too…Clement?

Yes, there is a system property (org.apache.felix.ipojo.handler.auto.primitive) letting you attaching handlers to all (primitive) instances. The value is a comma separated list. Each element is the fully qualified name of the handler (namespace:name).

Regards,

Clement

> 
> -> richard
> 
> 
>> 
>> --
>> Rémi Druilhe
>> 
>> -------- Message d'origine--------
>> De: Richard S. Hall [mailto:heavy@ungoverned.org]
>> Date: mar. 20/12/2011 14:34
>> À: users@felix.apache.org
>> Objet : Re: Setting and getting properties in iPojo
>> 
>> Not sure, but it sounds like more of a job for a custom handler than a
>> component.
>> 
>> Maybe Clement has better advice...
>> 
>> ->  richard
>> 
>> On 12/20/11 05:34 , remi.druilhe@orange.com wrote:
>>> Hello,
>>> 
>>> I'd like to know if there is an easy way to set and get properties of a component by another one (in a different bundle, assuming this is iPojo that validate/invalidate each component). In a short way, I'd like to have a component that is able to introspect another component as soon as its instance is created (but before the validation) and set some properties and get those properties (assuming they changed) after the invalidation (and before any destruction on the instance).
>>> 
>>> Thanks
>>> 
>>> Regards,
>>> --
>>> Rémi Druilhe
>>> 
>> ---------------------------------------------------------------------
>> 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: RE : Setting and getting properties in iPojo

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 12/21/11 08:16 , remi.druilhe@orange.com wrote:
> I'd not like to use a handler because a developper would need to declare it in each components (and this is a handler that will be declared in each components). That seems very intrusive for me. Instead, I'd like a component that is able to introspect, through Ipojo, the properties of another component and set some properties if needed. That seems less intrusive for me because the developper doesn't need to care about this aspect. But the Ipojo API doesn't seems to let me do that easily :-/

I thought that iPOJO let you automatically attach handlers to components 
too...Clement?

-> richard


>
> --
> Rémi Druilhe
>
> -------- Message d'origine--------
> De: Richard S. Hall [mailto:heavy@ungoverned.org]
> Date: mar. 20/12/2011 14:34
> À: users@felix.apache.org
> Objet : Re: Setting and getting properties in iPojo
>
> Not sure, but it sounds like more of a job for a custom handler than a
> component.
>
> Maybe Clement has better advice...
>
> ->  richard
>
> On 12/20/11 05:34 , remi.druilhe@orange.com wrote:
>> Hello,
>>
>> I'd like to know if there is an easy way to set and get properties of a component by another one (in a different bundle, assuming this is iPojo that validate/invalidate each component). In a short way, I'd like to have a component that is able to introspect another component as soon as its instance is created (but before the validation) and set some properties and get those properties (assuming they changed) after the invalidation (and before any destruction on the instance).
>>
>> Thanks
>>
>> Regards,
>> --
>> Rémi Druilhe
>>
> ---------------------------------------------------------------------
> 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: Setting and getting properties in iPojo

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

You can do what you want with:
* the Architecture service (exposed by all instances by default) for the introspection
* the iPOJO API for the property manipulation (http://felix.apache.org/site/apache-felix-ipojo-api.html)

Regards,

Clement



On 21.12.2011, at 14:16, <re...@orange.com> wrote:

> I'd not like to use a handler because a developper would need to declare it in each components (and this is a handler that will be declared in each components). That seems very intrusive for me. Instead, I'd like a component that is able to introspect, through Ipojo, the properties of another component and set some properties if needed. That seems less intrusive for me because the developper doesn't need to care about this aspect. But the Ipojo API doesn't seems to let me do that easily :-/
> 
> --
> Rémi Druilhe
> 
> -------- Message d'origine--------
> De: Richard S. Hall [mailto:heavy@ungoverned.org]
> Date: mar. 20/12/2011 14:34
> À: users@felix.apache.org
> Objet : Re: Setting and getting properties in iPojo
> 
> Not sure, but it sounds like more of a job for a custom handler than a 
> component.
> 
> Maybe Clement has better advice...
> 
> -> richard
> 
> On 12/20/11 05:34 , remi.druilhe@orange.com wrote:
>> Hello,
>> 
>> I'd like to know if there is an easy way to set and get properties of a component by another one (in a different bundle, assuming this is iPojo that validate/invalidate each component). In a short way, I'd like to have a component that is able to introspect another component as soon as its instance is created (but before the validation) and set some properties and get those properties (assuming they changed) after the invalidation (and before any destruction on the instance).
>> 
>> Thanks
>> 
>> Regards,
>> --
>> Rémi Druilhe
>> 
> 
> ---------------------------------------------------------------------
> 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 : Setting and getting properties in iPojo

Posted by re...@orange.com.
I'd not like to use a handler because a developper would need to declare it in each components (and this is a handler that will be declared in each components). That seems very intrusive for me. Instead, I'd like a component that is able to introspect, through Ipojo, the properties of another component and set some properties if needed. That seems less intrusive for me because the developper doesn't need to care about this aspect. But the Ipojo API doesn't seems to let me do that easily :-/

--
Rémi Druilhe

-------- Message d'origine--------
De: Richard S. Hall [mailto:heavy@ungoverned.org]
Date: mar. 20/12/2011 14:34
À: users@felix.apache.org
Objet : Re: Setting and getting properties in iPojo
 
Not sure, but it sounds like more of a job for a custom handler than a 
component.

Maybe Clement has better advice...

-> richard

On 12/20/11 05:34 , remi.druilhe@orange.com wrote:
> Hello,
>
> I'd like to know if there is an easy way to set and get properties of a component by another one (in a different bundle, assuming this is iPojo that validate/invalidate each component). In a short way, I'd like to have a component that is able to introspect another component as soon as its instance is created (but before the validation) and set some properties and get those properties (assuming they changed) after the invalidation (and before any destruction on the instance).
>
> Thanks
>
> Regards,
> --
> Rémi Druilhe
>

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




Re: Setting and getting properties in iPojo

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Not sure, but it sounds like more of a job for a custom handler than a 
component.

Maybe Clement has better advice...

-> richard

On 12/20/11 05:34 , remi.druilhe@orange.com wrote:
> Hello,
>
> I'd like to know if there is an easy way to set and get properties of a component by another one (in a different bundle, assuming this is iPojo that validate/invalidate each component). In a short way, I'd like to have a component that is able to introspect another component as soon as its instance is created (but before the validation) and set some properties and get those properties (assuming they changed) after the invalidation (and before any destruction on the instance).
>
> Thanks
>
> Regards,
> --
> Rémi Druilhe
>

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