将AOP与OSGI一起使用的最佳解决方案? [英] Best solution for using AOP with OSGI?

查看:200
本文介绍了将AOP与OSGI一起使用的最佳解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Equinox,因此Equinox Aspect项目似乎很容易理解,但是该项目似乎处于非活动状态,并且只有一页文档使我无所适从.

I am using Equinox, so the Equinox Aspect project seems like a no-brainer, but that project appears to be inactive and has only one page of documentation that leaves me hanging at the end.

除了该项目之外,我在OSGI中没有看到许多使用AOP的选项.让我知道你们的想法和可能性,谢谢:)

Other than that project, I do not see many options for using AOP in OSGI. Let me know what you all think and what the possibilities are, thanks :)

推荐答案

作为替代方案,您还可以考虑使用Apache Felix Dependency Manager,它允许您在运行时将拦截器添加到现有OSGi服务中.当然,这绝不是完全的AOP替代,但是对于某些用例来说,这可能就足够了.

As an alternative, you could also consider using the Apache Felix Dependency Manager, which allows you to at runtime add interceptors to existing OSGi services. Of course this is in no way a full AOP replacement, but for some use cases it might be enough.

您可以在此处找到更多文档和示例:

You can find more documentation and an example here:

http://felix.apache. org/site/apache-felix-dependency-manager-osgi-design-patterns.html

这篇关于将AOP与OSGI一起使用的最佳解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆