You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "Gay David (Annecy)" <dg...@axway.com> on 2010/09/08 09:12:34 UTC

iPojo customer handler

Hi all,

 

I would like to create a new iPojo handler.

I've read the tutorial here :
http://felix.apache.org/site/how-to-write-your-own-handler.html

 

I want to know if it's possible to create a handler without having to
define the handler usage

in metadata. For example, want I would like to do, is to have a log
handler like in the example

,but without to modify existing iPojo component (to not have to specify
<log:log level="WARNING"/>)

 

What I would like to have, is an optional service method interceptor
handler to compute some

metrics and/or check some security policies. But I don't want developers
have to explicitly

set the handler usage.

 

Is it possible to do that ?

 

Thanks for your help.

Regards

David G.

 


RE: iPojo customer handler

Posted by "Gay David (Annecy)" <dg...@axway.com>.
Ok, issue created here : https://issues.apache.org/jira/browse/FELIX-2594
Thanks again and have a nice week end !

David G.

-----Message d'origine-----
De : Gay David (Annecy) [mailto:dgay@axway.com] 
Envoyé : vendredi 10 septembre 2010 15:24
À : users@felix.apache.org
Objet : RE: iPojo customer handler

Hi Guillaume, Hi Clement,

Thanks you very much for help and quick answer.
I'll open an issue ASAP.

Regards
David G.

-----Message d'origine-----
De : Clement Escoffier [mailto:clement.escoffier@gmail.com] 
Envoyé : jeudi 9 septembre 2010 19:19
À : users@felix.apache.org
Objet : Re: iPojo customer handler


On 08.09.2010, at 09:45, Guillaume Sauthier wrote:

> Hmm
> AFAIK, there is no such option (Clement, correct me if I'm wrong).
> Component type's handlers are discovered using the metadata: all child elements of ipojo:component will be considered as handler requirements. This computation is done once during the component startup, and then the required handlers list is never touched again.
> 
> ATM, you may implement a new iPOJO ComponentFactory (extending the usual ComponentFactory class) that automatically adds a new handler declaration for all the components that will be created.
> But that will still requires a change in the metadata.xml: components should be declared using a new tag (like <my-component> instead of <component>). And you'll have to digg inside the iPOJO's internals ... not an ideal solution :)
> 
> I think that could be a nice new feature for the next iPOJO version: something that let you adapt ComponentFactory services to your own needs...
> Clement, what do you think ?

Hi,

Just definitely a good idea, and everything to do that is already here. Indeed, the architecture handle is ... automatically plugged to the instance :-)

Please open an issue, we will investigate this issue ASAP.

Regards,

Clement

> 
> --Guillaume
> 
> Le 08/09/2010 09:12, Gay David (Annecy) a écrit :
>> Hi all,
>> 
>> 
>> 
>> I would like to create a new iPojo handler.
>> 
>> I've read the tutorial here :
>> http://felix.apache.org/site/how-to-write-your-own-handler.html
>> 
>> 
>> 
>> I want to know if it's possible to create a handler without having to
>> define the handler usage
>> 
>> in metadata. For example, want I would like to do, is to have a log
>> handler like in the example
>> 
>> ,but without to modify existing iPojo component (to not have to specify
>> <log:log level="WARNING"/>)
>> 
>> 
>> 
>> What I would like to have, is an optional service method interceptor
>> handler to compute some
>> 
>> metrics and/or check some security policies. But I don't want developers
>> have to explicitly
>> 
>> set the handler usage.
>> 
>> 
>> 
>> Is it possible to do that ?
>> 
>> 
>> 
>> Thanks for your help.
>> 
>> Regards
>> 
>> David G.
>> 
>> 
>> 
>> 
>>   
> 
> 
> ---------------------------------------------------------------------
> 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


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


RE: iPojo customer handler

Posted by "Gay David (Annecy)" <dg...@axway.com>.
Hi Guillaume, Hi Clement,

Thanks you very much for help and quick answer.
I'll open an issue ASAP.

Regards
David G.

-----Message d'origine-----
De : Clement Escoffier [mailto:clement.escoffier@gmail.com] 
Envoyé : jeudi 9 septembre 2010 19:19
À : users@felix.apache.org
Objet : Re: iPojo customer handler


On 08.09.2010, at 09:45, Guillaume Sauthier wrote:

> Hmm
> AFAIK, there is no such option (Clement, correct me if I'm wrong).
> Component type's handlers are discovered using the metadata: all child elements of ipojo:component will be considered as handler requirements. This computation is done once during the component startup, and then the required handlers list is never touched again.
> 
> ATM, you may implement a new iPOJO ComponentFactory (extending the usual ComponentFactory class) that automatically adds a new handler declaration for all the components that will be created.
> But that will still requires a change in the metadata.xml: components should be declared using a new tag (like <my-component> instead of <component>). And you'll have to digg inside the iPOJO's internals ... not an ideal solution :)
> 
> I think that could be a nice new feature for the next iPOJO version: something that let you adapt ComponentFactory services to your own needs...
> Clement, what do you think ?

Hi,

Just definitely a good idea, and everything to do that is already here. Indeed, the architecture handle is ... automatically plugged to the instance :-)

Please open an issue, we will investigate this issue ASAP.

Regards,

Clement

> 
> --Guillaume
> 
> Le 08/09/2010 09:12, Gay David (Annecy) a écrit :
>> Hi all,
>> 
>> 
>> 
>> I would like to create a new iPojo handler.
>> 
>> I've read the tutorial here :
>> http://felix.apache.org/site/how-to-write-your-own-handler.html
>> 
>> 
>> 
>> I want to know if it's possible to create a handler without having to
>> define the handler usage
>> 
>> in metadata. For example, want I would like to do, is to have a log
>> handler like in the example
>> 
>> ,but without to modify existing iPojo component (to not have to specify
>> <log:log level="WARNING"/>)
>> 
>> 
>> 
>> What I would like to have, is an optional service method interceptor
>> handler to compute some
>> 
>> metrics and/or check some security policies. But I don't want developers
>> have to explicitly
>> 
>> set the handler usage.
>> 
>> 
>> 
>> Is it possible to do that ?
>> 
>> 
>> 
>> Thanks for your help.
>> 
>> Regards
>> 
>> David G.
>> 
>> 
>> 
>> 
>>   
> 
> 
> ---------------------------------------------------------------------
> 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: iPojo customer handler

Posted by Clement Escoffier <cl...@gmail.com>.
On 08.09.2010, at 09:45, Guillaume Sauthier wrote:

> Hmm
> AFAIK, there is no such option (Clement, correct me if I'm wrong).
> Component type's handlers are discovered using the metadata: all child elements of ipojo:component will be considered as handler requirements. This computation is done once during the component startup, and then the required handlers list is never touched again.
> 
> ATM, you may implement a new iPOJO ComponentFactory (extending the usual ComponentFactory class) that automatically adds a new handler declaration for all the components that will be created.
> But that will still requires a change in the metadata.xml: components should be declared using a new tag (like <my-component> instead of <component>). And you'll have to digg inside the iPOJO's internals ... not an ideal solution :)
> 
> I think that could be a nice new feature for the next iPOJO version: something that let you adapt ComponentFactory services to your own needs...
> Clement, what do you think ?

Hi,

Just definitely a good idea, and everything to do that is already here. Indeed, the architecture handle is ... automatically plugged to the instance :-)

Please open an issue, we will investigate this issue ASAP.

Regards,

Clement

> 
> --Guillaume
> 
> Le 08/09/2010 09:12, Gay David (Annecy) a écrit :
>> Hi all,
>> 
>> 
>> 
>> I would like to create a new iPojo handler.
>> 
>> I've read the tutorial here :
>> http://felix.apache.org/site/how-to-write-your-own-handler.html
>> 
>> 
>> 
>> I want to know if it's possible to create a handler without having to
>> define the handler usage
>> 
>> in metadata. For example, want I would like to do, is to have a log
>> handler like in the example
>> 
>> ,but without to modify existing iPojo component (to not have to specify
>> <log:log level="WARNING"/>)
>> 
>> 
>> 
>> What I would like to have, is an optional service method interceptor
>> handler to compute some
>> 
>> metrics and/or check some security policies. But I don't want developers
>> have to explicitly
>> 
>> set the handler usage.
>> 
>> 
>> 
>> Is it possible to do that ?
>> 
>> 
>> 
>> Thanks for your help.
>> 
>> Regards
>> 
>> David G.
>> 
>> 
>> 
>> 
>>   
> 
> 
> ---------------------------------------------------------------------
> 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: iPojo customer handler

Posted by Guillaume Sauthier <Gu...@objectweb.org>.
Hmm
AFAIK, there is no such option (Clement, correct me if I'm wrong).
Component type's handlers are discovered using the metadata: all child 
elements of ipojo:component will be considered as handler requirements. 
This computation is done once during the component startup, and then the 
required handlers list is never touched again.

ATM, you may implement a new iPOJO ComponentFactory (extending the usual 
ComponentFactory class) that automatically adds a new handler 
declaration for all the components that will be created.
But that will still requires a change in the metadata.xml: components 
should be declared using a new tag (like <my-component> instead of 
<component>). And you'll have to digg inside the iPOJO's internals ... 
not an ideal solution :)

I think that could be a nice new feature for the next iPOJO version: 
something that let you adapt ComponentFactory services to your own needs...
Clement, what do you think ?

--Guillaume

Le 08/09/2010 09:12, Gay David (Annecy) a écrit :
> Hi all,
>
>
>
> I would like to create a new iPojo handler.
>
> I've read the tutorial here :
> http://felix.apache.org/site/how-to-write-your-own-handler.html
>
>
>
> I want to know if it's possible to create a handler without having to
> define the handler usage
>
> in metadata. For example, want I would like to do, is to have a log
> handler like in the example
>
> ,but without to modify existing iPojo component (to not have to specify
> <log:log level="WARNING"/>)
>
>
>
> What I would like to have, is an optional service method interceptor
> handler to compute some
>
> metrics and/or check some security policies. But I don't want developers
> have to explicitly
>
> set the handler usage.
>
>
>
> Is it possible to do that ?
>
>
>
> Thanks for your help.
>
> Regards
>
> David G.
>
>
>
>
>