0 Replies Latest reply on Jan 17, 2010 1:07 PM by szpak

    Wiring annotation with interceptor in XML for POJO (instead of @Interceptors) - perf4j integration

      Hi,



      I am working on a mechanism which allows for a simple measure of method execution time with perf4j using annotation on a method in Seam environment. There was no problem to create a @Perf4jProfiled annotation and corresponding interceptor (which do the measurement), but I would like to make a closer integration with Perf4j. Perf4j provides @Profiled annotation which allows to define additional parameters controlling measurement.

      To prevent duplication of that code on my side and minimize refactoring in perf4j core module it would be best to use original @Profiled annotation (from perf4j package) to mark measured methods. Unfortunately to wire annotation with Seam interceptor it's required to use @Interceptors() on the original (external) annotation. A workaround could be using XML interceptor binding.


      The question is:

      Is it possible to bind/wire an interceptor with an annotation using XML for POJO in Seam (something like <interceptor-binding> in ejb-jar.xml for EJB) instead of @Interceptors() annotation?



      Regards

      Marcin