How should I build a modularized enterprise application which must use Spring and JPA?

ぃ、小莉子 提交于 2019-12-06 11:40:32

问题


I'm planning to build a Java-based system to handle different business processes where each of these is a particular module in the system. Most modules would depend on some of the other modules to handle their particular business process. In other words, top modules would consume some sort of basic services provided by underlying modules. Some modules will be developed from the very beginning, but some will be added to the system later. Next, some modules will expose RESTful interfaces to handle external input / output.

To handle all this, OSGi seems appropriate, but it's a bit difficult to learn with all the different "distributions" out there (Equinox, Felix, etc.) and I'm concerned about the ease of using the Spring framework and other 3rd party libraries within each module (starting with Spring 3.2 the different jars might not come with OSGi manifests).

On top of this, I'd like a central web portal to administer all bundles, thus with each new bundle there will be a new admin section.


回答1:


that's why we developed osgi-less modularity for Spring https://github.com/griddynamics/banshun Your feedback is appreciated!




回答2:


Why do you need OSGi? Why not use a Web Server like Tomcat, and deploy your application as a war? You can deploy it on multiple servers in a cluster, and your application can scale on and on.




回答3:


Why do you need Spring? It has become incredibly coupled. And it has a complexity that find quite useless since OSGi applications tend to be built from small components communicating through services; voiding most of the advantages of the Spring wiring model which assumes it is central.

And hard to configure is a strange remark, OSGi is excellent configuration support. It is just different than what you're used to.




回答4:


Instead of using spring, why not using OSGi Blueprint it'll give you an "easy" transition from Spring to OSGi.



来源:https://stackoverflow.com/questions/15525756/how-should-i-build-a-modularized-enterprise-application-which-must-use-spring-an

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!