I think we do not have to invent this. There is already aspecio. https://github.com/primeval-io/aspecio
Christian Am Mo., 11. Nov. 2019 um 19:37 Uhr schrieb Romain Manni-Bucau < rmannibu...@gmail.com>: > Hi all, > > I took some time this week-end to draft an interceptor module in Karaf. > I tried to describe it in the related PR ([1]) - in WIP mode so don't jump > on me yet cause tests are not there please ;). > > High level, I missed a lot interceptors (from javax.) when starting to use > SCR. > It mainly change the way to add transversal features (metrics, security, > tracing, circuit-breaker, asynchronism to cite a few). > > I still have some API refinement to do but high level it would enable a > service to be marked as intercepted ([2]) and implement interceptors "as > usual" ([3]) and link them with a marker (in the PoC it is an annotation). > > It is in very early stages but before investing way more time, I'd like to > know if it sounds like a module Karaf could host and would benefit more > than me or if it is an "EE guy" idea ;). > > Wdyt? > > [1] https://github.com/apache/karaf/pull/993 > [2] > > https://github.com/apache/karaf/pull/993/files#diff-5edc34da45232dc12a96cae52e620adcR22 > [3] > > https://github.com/apache/karaf/pull/993/files#diff-412d137df581cff1938e723692a1ec45R24 > > 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 > > > -- -- Christian Schneider http://www.liquid-reality.de Computer Scientist http://www.adobe.com