Can I inject proxies in front of Blueprint services published by other bundles?

后端 未结 2 1612
时光取名叫无心
时光取名叫无心 2021-01-24 09:09

We are using Karaf and a number of OSGI Blueprint services to implement a system.

Is it possible to make a \"BundleListener\" type

2条回答
  •  有刺的猬
    2021-01-24 09:37

    Although not implemented as a proxy, a Blueprint Interceptor might do what you want; you can intercept method invocations before or after the call to the original bean. I assume this is what you'd be doing with your proxy anyway. The Aries Blueprint implementation in Karaf should definitely support interceptors. However, I can't find good documentation or examples outside the Aries source itself, which makes this answer less useful than I'd hoped!

提交回复
热议问题