felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Sauthier <Guillaume.Sauth...@objectweb.org>
Subject Re: iPojo customer handler
Date Wed, 08 Sep 2010 07:45:37 GMT
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.
>
>
>
>
>    


Mime
View raw message