本文介绍了比较 OpenEjb 和 Glassfish的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们能否将 Glassfish 替换为 Tomcat/OpenEJB 以获得更轻量级的应用程序?OpenEJB 作为 EJB 容器与 glassfish 相比性能如何?

can we replace Glassfish with Tomcat/OpenEJB for lighter applications?What is the performance of OpenEJB comparing to glassfish as EJB container.

OpenEJB 代替 glassfish 有什么限制?

What is the restrictions of OpenEJB instead of glassfish?

问候

推荐答案

我猜这个问题是关于运行时环境的,但我仍然不明白 lighter application 是什么意思.内存占用?启动时间?部署时间?你实际上有什么问题?请定义光.

I guess the question is about the runtime environment but still, I don't understand what lighter application does mean. Memory footprint? Startup time? Deployment time? What problem do you actually have? And please define light.

就其价值而言,我认为 GlassFish 3 是一个轻量级的运行时,我对它的体验非常积极.来自产品数据表:

For what it's worth, I consider GlassFish 3 as a light runtime and my experience with it is very positive. From the product data sheet:

Oracle GlassFish Server 3 实现了 OSGi 运行时,它允许根据需要将功能动态添加到 Java 服务器,并部署尽可能小的 Java 堆栈以支持应用程序.这有助于通过仅加载为已部署的应用程序提供服务所需的模块来尽可能减少占用空间,从而缩短启动时间并降低资源利用率.

其次,我个人不喜欢科学怪人的方法,我相信你使用真正的应用服务器获得的所有部分之间的粘合剂是附加价值的一部分,这实际上就是我使用应用服务器的原因.

Second, I personally don't like the Frankenstein approach, I believe that the glue between all parts that you get with a real application server is part of the added value, that's actually why I use an app server.

第三,我从来没有替 OpenEJB 做替补,我只将它用于测试,从未计划将它用于生产,主要是因为它的坏名声.请参阅此 评论,了解 Geronimo 在 TSS 上的表现(来自 Hani Suleiman,如果它是腐蚀性的,请不要感到惊讶):

Third, I never benched OpenEJB, I used it for testing only and never planned to use it for production, mostly because of its bad reputation. See this comment about Geronimo's performances on TSS (from Hani Suleiman, don't be surprised if it's caustic):

我认为 EJB等级是可接受的"是关于你能说的最好的话.

据我所知,geronimo 的 ejb 代码基于openEJB,它有,从历史上看,bean 是最糟糕的容器你可能会找到.你必须看起来也很难找到,只有充满不同程度的一旦你实现了后悔/愤怒可疑的目标.

From what I know, geronimo's ejb code is based off openEJB, which has, historically, bean the worst container you could possibly find. You'd have to look pretty hard to find it too, only to be filled with various degrees of regret/rage once you achieve that dubious goal.

G 并不奇怪性能永远低于标准.软件的科学怪人方法建筑是一个伟大的秘诀表现.当然,你会有很多漂亮的图表,很好看依赖图和松散耦合.所有这些都与想要一致的应用服务器的用户他们可以将其视为黑匣子.

It's not surprising that G's performance will always be sub-par. The frankenstein approach of software building is a great recipe for bad performance. Sure, you'll have lots of pretty diagrams, great looking dependency graphs, and loose coupling. All of which are fairly irrelevant to users who want a coherent appserver that they can treat as a black box.

事情可能已经改变了,OpenEJB 可能已经改进了,至少有一点,但仍然:

Things might have changed, OpenEJB has probably improved, at least a bit, but still:

  • OpenEJB 不完全支持 EJB 3.1.
  • Tomcat + OpenEJB 仍然不是一个完整的 Java EE 实现,您可能仍然需要为您的生物添加一些部分(更不用说 Java EE 6).
  • 那么管理、集群等呢?
  • 如果您不需要完整的 Java EE 6 配置文件,可以使用 Java EE 6 Web 配置文件
  • 我对 GlassFish 3 很满意,我不觉得它重"(我建议尝试一下).
  • 我知道它可以表现良好.

出于所有这些原因,我不会考虑用 Tomcat+OpenEJB 代替 GlassFish,尤其是在没有问题需要解决的情况下.

For all these reasons, I wouldn't consider Tomcat+OpenEJB instead of GlassFish, especially if there is no problem to solve.

这篇关于比较 OpenEjb 和 Glassfish的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-20 12:20