OSGi 在应用程序服务器中访问 Java EE

发布于 2025-01-06 22:05:20 字数 489 浏览 0 评论 0原文

我已经开始研究 OSGi 并同意它是前进的方向,因为它只需根据捆绑规范打包您的东西即可为您提供出色的可扩展性。不管怎样......我的要求是,目前我有我的Java运行时和一些使用Java EE服务(如JCA和JMS服务器)的服务来处理应用程序服务器(如jBoss,WebLogic,GlassFish和WebSphere)中的请求......我想要将我的服务制作和部署为 OSGi 捆绑包......但是我是否可以从 OSGi 容器内访问 Java EE 资源?否则,我必须将所有内容(我的运行时、Web 客户端等)包装为 OSGi 捆绑包,因为以下原因我想避免这样做:

  1. 我需要很长时间
  2. 才能失去所有 Java EE 功能,这是不可取的,
  3. 似乎从头开始编写和测试所有内容。

我已经搜索了很多,但找不到任何解决方案,并且所有关于这一点的帖子都至少有 3 年的历史了。有人可以引导我走向正确的方向并指出该领域的一些最新进展吗?

如果您需要更多信息,请告诉我。

I have started looking at the OSGi and agreed that it is way forward because it gives you great extensibility by just packaging your stuff according to the bundle specs. Anyway....my requirement is that currently I have my Java runtime and some services which uses Java EE services like JCA and JMS Server to process the requests within in an Application Servers like jBoss, WebLogic, GlassFish and WebSphere....I want to make and deploy my services as an OSGi bundles....but Is there anyway I can access Java EE resources from within my OSGi container? Otherwise I have to wrap everything (my runtime, web client etc) as an OSGi bundles which I want to avoid because of following reasons;

  1. It will take an ages
  2. I will loose all my Java EE functionalities which is not desirable
  3. Seems like writing and testing everything from scratch.

I have searched a lot but couldn't find any solution and all the post regarding this point are at-least 3years old. Can someone guide me to the right direction and point me to some latest advancements in this area.

Let me know if you need more information.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

一腔孤↑勇 2025-01-13 22:05:20

企业 OSGI 规范旨在利用企业服务。阅读企业 OSGi 实战一书。

The Enterprise OSGI spec is geared towards leveraging enterprise services. Read the Enterprise OSGi in Action book.

失与倦" 2025-01-13 22:05:20

如果您搜索“企业 OSGi”,您可能会更幸运并获得更多想法。许多主要应用程序服务器(包括 WebSphere、Glassfish 和 JBoss)现在都支持 OSGi 和 Java EE 组件之间的集成。一种选择是使用 JNDI 桥,它允许使用 JNDI 查找您的 OSGi 服务。另一种方法是使用 SCA 将事物连接在一起。 Apache Aries 的 SPI-fly 项目还允许您将 META-INF/服务公开为 OSGi 服务。

If you search for 'enterprise OSGi' you may have more luck and get some more ideas. Many of the main application servers, including WebSphere, Glassfish, and JBoss now support integration between OSGi and Java EE components. One option is to use a JNDI bridge which allows your OSGi services to be looked up using JNDI. Another is to use SCA to connect things together. Apache Aries' SPI-fly project also allows you to expose META-INF/services as OSGi services.

亢潮 2025-01-13 22:05:20

您可以嵌入 OSGi 并将 Java EE 资源作为服务发布到 OSGi 框架中。我写了一篇关于这个主题的博客文章,可能会有所帮助: http://njbartlett.name /2011/03/07/embedding-osgi.html

You could embed OSGi and publish the Java EE resources as services into the OSGi framework. I wrote a blog post on this topic which may help: http://njbartlett.name/2011/03/07/embedding-osgi.html

記柔刀 2025-01-13 22:05:20

GlassFish 服务器是使用 OSGi 构建的,现在支持 OSGi 和 Java EE 服务之间的良好集成。它公开 API 以将 Java EE 服务作为 OSGi 服务进行访问,并且还支持所谓的混合应用程序捆绑包,您可以在其中无缝地在 Java EE 应用程序中使用 OSGi 服务。有关更多详细信息,请参阅此文档:

使用 GlassFish 进行 OSGi 开发

GlassFish server is built using OSGi, and now supports nice integration between OSGi and Java EE services. It exposes APIs to access Java EE services as OSGi services and also supports a so called Hybrid Application bundle where you can seamlessly use OSGi services in your Java EE application. Refer to this document for more details:

OSGi Development using GlassFish

墨小沫ゞ 2025-01-13 22:05:20

SpringSource dm Server,简称dm Server,是SpringSource应用平台的运行时部分。它是一个轻量级、模块化、基于 OSGi 的运行时,为开发、部署和管理企业应用程序提供完整的打包解决方案。通过利用多种最佳技术并对其进行改进,dm Server 提供了一个引人注目的解决方案来开发和部署企业应用程序,

您可以在 春季页面

The SpringSource dm Server, or dm Server for short, is the runtime portion of the SpringSource Application Platform. It is a lightweight, modular, OSGi-based runtime that provides a complete packaged solution for developing, deploying, and managing enterprise applications. By leveraging several best-of-breed technologies and improving upon them, the dm Server offers a compelling solution to develop and deploy enterprise applications

you can get more infos at spring page

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文