在OSGi中同时使用Blueprint和Spring(not spring-dm) [英] Using both Blueprint and Spring (Not spring-dm) with OSGi

查看:229
本文介绍了在OSGi中同时使用Blueprint和Spring(not spring-dm)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Spring3应用程序,它在启动时需要花费3分钟的时间来加载大型域模型...当将应用程序偶尔一次部署到生产环境中时,这很好,但是在进行开发更改时会感到非常痛苦由于应用程序的停止/启动.

I have a Spring3 application which takes about 3 minutes to load a big domain model on startup... this is fine when the application is deployed to a production environment every once in a while but its a massive pain when making development changes due to the stopping/starting of the application.

我做了一些调查,我喜欢使用OSGi在模块中分离我的应用程序的想法,这样我可以只部署应用程序中正在更改的部分(例如,当我需要时,无需部署域模型). m对持久层进行更改);但是我发现进入OSGi的障碍非常高.

I've done a bit of investigation and I like the idea of separating my application in modules using OSGi so that I can deploy only the parts of my application which are changing (e.g. No need to deploy the Domain Model when I'm making changes to the Persistence layer); However I've found the barrier to entry for OSGi to be quite high.

是否可以同时使用Blueprint来注入模块之间提供的服务(例如,将域模型的实现公开到我的Web层),并继续在每个模块内部使用Spring框架(而非Spring Dynamic Modules) ?

Is it possible to use both Blueprint to inject the services provided between modules (e.g to expose implementations of the domain model to my web tier) and to continue to use the Spring framework (not Spring Dynamic Modules) inside each of my modules?

推荐答案

您不能混合使用蓝图和弹簧.它们是两种相似但不兼容的独立技术.

You can not mix blueprint and spring. They are two separate technologies that are similar but incompatible.

我也不建议在OSGi中使用spring dm.虽然它适用于一些简单的情况,但它具有可怕的类加载模型,这会导致OSGi中出现大量问题.请参见来自Guillaume Nodet的文章.除此之外,spring dm被springsource放弃了.自古以来,甚至没有错误修复.

I would also not recommend using spring dm in OSGi. While it works for some simple cases it has a horrible classloading model that leads to massive problems in OSGi. See this article from Guillaume Nodet. Besides that spring dm was abandoned by springsource. There are not even bug fixes since ages.

春天双子座实际上也被抛弃了. Springsource将其捐赠给日食,然后停止对其进行真正的工作.

Spring Gemini is also practically abandoned. Springsource donated it to eclipse and then ceased to really work on it.

因此,如果您想转至OSGi,则必须切换到白羊座"蓝图或声明性服务.因此,不要低估工作量.

So if you want to go this step to OSGi you will have to switch to aries blueprint or to declarative services. So do not underestimate the effort.

这篇关于在OSGi中同时使用Blueprint和Spring(not spring-dm)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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