You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by vranac <ko...@yahoo.com> on 2018/05/28 07:09:54 UTC

Interceptors discovery

I want to introduce some metrics in web project. First option is to use
metrics from microprofile, but it seems that there is no support in TomEE
for that. Next was to use dropwizard metrics and corresponding cdi library(
metrics-cdi <https://github.com/astefanutti/metrics-cdi>  ).But there is
problem using that library. Library is using interceptors to collect
metrics.There is small git project( tomee and metrics-cdi
<https://github.com/ashri/metrics-cdi-jaxrshttp://>  ) build by other person
having the same issue.After some debug I can see that only one  interceptors
<https://github.com/astefanutti/metrics-cdi/blob/master/impl/src/main/java/io/astefanutti/metrics/cdi/MetricsInterceptor.java>  
is discover by TomEE from four interceptors that are needed to collect
metrics.If I add other interceptorts(e.g.  TimedInterceptor
<https://github.com/astefanutti/metrics-cdi/blob/master/impl/src/main/java/io/astefanutti/metrics/cdi/TimedInterceptor.java> 
) to the beans.xml then metrics are getting collected as expected. But, also
I get warning in console from TomEE that this interceptors are already
discovered. If i removed entries form beans.xml, then warning is gone, but
then there is no metrics collected.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Interceptors discovery

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

https://github.com/apache/geronimo-metrics should run in tomee 8, we plan
to release it pretty soon so it can be a good choice.

For your particular issue, I think your issue is that the name of your
artifact is excluded, try to rename it "foo-metrics.jar" and you will know.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le mer. 13 juin 2018 à 14:40, Matthew Broadhead <
matthew.broadhead@nbmlaw.co.uk> a écrit :

> sorry i am not too sure about interceptors.  also there are a lot of
> conferences at the moment so the main people that can help you are
> probably busy for a few days.  i am sure you will get an answer when
> they return
>
> On 12/06/18 08:45, vranac wrote:
> > Did I asked difficult questions or what? I think few of them could be
> answer
> > just with yes/no.
> >
> >
> >
> > --
> > Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>
>

Re: Interceptors discovery

Posted by Matthew Broadhead <ma...@nbmlaw.co.uk>.
sorry i am not too sure about interceptors.  also there are a lot of 
conferences at the moment so the main people that can help you are 
probably busy for a few days.  i am sure you will get an answer when 
they return

On 12/06/18 08:45, vranac wrote:
> Did I asked difficult questions or what? I think few of them could be answer
> just with yes/no.
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html


Re: Interceptors discovery

Posted by vranac <ko...@yahoo.com>.
Did I asked difficult questions or what? I think few of them could be answer
just with yes/no.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Interceptors discovery

Posted by vranac <ko...@yahoo.com>.
Still have issue with interceptors, and I have follow up question is TomEE
CDI 1.2 compatible?

Also, is there any library that implements microprofile metrics that is
working on TomEE?



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html