OSGi and application servers

烈酒焚心 提交于 2019-12-19 05:22:23

问题


I'm having trouble undrstanding the difference about both platforms? Both seem to offer an environment for deploying and managing applications. First I thought app servers use OSGi under the hood, I don't think so now but I see large AS (jboss, glassfish, websphere, etc) use OSGi. What's the big picture?

Thank you


回答1:


There is (to some extend) an overload of the term "application".

OSGi is a runtime environment (and development model) for modular Java applications. The term "application" in this case can be really, really low level. For example, an application server can be considered such an "application".

Application servers are also a runtime environment (and development model) for Java applications. However, the term "application" in this case typically refers to a higher level application type (eg., web applications). Application servers typically include a rich set of higher functionality and programming APIs for building web applications (Servlets), persisting data into databases (JPA) and clustering capabilities. Most application servers these days are composed of modules (eg., core, servlet engine, EJB container, etc.). Some application servers use OSGi under the covers. Others have their own modular runtime environment which also offers OSGi capabilities.

But it's also possible to develop higher level applications (such as web applications) directly using only OSGi runtime environment. However, an OSGi framework itself does not include any of the additional functionality. It has to be assembled yourself. There are some "distributions" that include a framework and several modules.



来源:https://stackoverflow.com/questions/12582709/osgi-and-application-servers

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