Discussion:
Interceptors discovery
vranac
2018-05-28 07:09:54 UTC
Permalink
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
vranac
2018-05-31 17:09:38 UTC
Permalink
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
vranac
2018-06-12 06:45:26 UTC
Permalink
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
Matthew Broadhead
2018-06-13 12:40:26 UTC
Permalink
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
Post by vranac
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
Romain Manni-Bucau
2018-06-13 13:00:40 UTC
Permalink
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 <
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
Post by vranac
Did I asked difficult questions or what? I think few of them could be
answer
Post by vranac
just with yes/no.
--
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Loading...