比较 OpenEjb 和 Glassfish
我们可以用 Tomcat/OpenEJB 替换 Glassfish 以实现更轻量级的应用程序吗? 与作为 EJB 容器的 glassfish 相比,OpenEJB 的性能如何?
OpenEJB 代替 glassfish 有什么限制?
问候
can we replace Glassfish with Tomcat/OpenEJB for lighter applications?
What is the performance of OpenEJB comparing to glassfish as EJB container.
What is the restrictions of OpenEJB instead of glassfish?
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
请注意,Hani 的评论是针对 Geronimo 1.0/OpenEJB 2.0 的。 Hani 在 Frankenstein 的评论中是错误的,因为 OpenEJB 2.x 代码库完全是为 Geronimo 从头开始构建的,因此它只能在 Geronimo 中运行;嵌入式、tomcat、独立模式全部丢失。我们发现哈尼的评论是正确的,因为表现不佳。
对于 OpenEJB 3.x,我们放弃了 2.x 代码库,并从 OpenEJB 1.x 中停止的地方继续进行,并将其提升到 EJB 3.0 认证。 2.x 和 3.x 不共享代码。 OpenEJB 3.x 的结果非常好,自 2008 年发布第一个 3.0 以来,该项目一直在快速发展。EJB 3.1 嵌入式容器和 .wars 功能中的 EJB 来自 OpenEJB。我们完成了第一个 @Singleton 实现,并希望在今年第四季度完成 EJB 3.1 的其余部分并验证 Web 配置文件。自 1 月份以来,故障转移和 JMX 监控一直在大力开发,现已完成,并将在几周后在 3.1.3 中发布。故障转移实际上是第二代,第一个故障转移支持是在 3.1.1 中发布的。 3.1.1 版本中完成了重要的远程性能工作,并在我们的基准测试中将 RPC 调用的平均值提高到 7300 TPS。
Apache OpenEJB 不是一个公司控制的开源项目,对某些人来说不那么重要,但对另一些人来说却非常重要。大多数提交者是已获得提交并在工作中使用 OpenEJB 的用户。这有其优点和缺点,但最重要的是 OpenEJB 充满了热爱它并使用它的人,并且社区与源代码一样开放。
更新
2011 年 10 月,我们通过“Tomcat+OpenEJB”(现在称为 Apache TomEE)获得了 Java EE 6 Web Profile 认证。
经过认证并具有更清晰的名称,我们希望这使得该堆栈更易于理解和比较。
就我个人而言,我认为该帖子中的评论是采取认证步骤的主要动力之一。感谢 StackOverlfow 的每个人提供的反馈,我觉得这些反馈既令人鼓舞又很有根据。与这个社区的联系给 OpenEJB/TomEE 带来了很多积极的变化。
Note that Hani's comment was in regards to Geronimo 1.0/OpenEJB 2.0. Hani was wrong in the frankenstein comment as the OpenEJB 2.x codebase was built entirely from scratch for Geronimo and as a result it only ran in Geronimo; the embedded, tomcat, and standalone modes were all lost. We found Hani's comment was right in that the performance was not good.
For OpenEJB 3.x we abandoned the 2.x codebase and picked things up from where we left off in OpenEJB 1.x and brought it up to EJB 3.0 certification. 2.x and 3.x share no code. OpenEJB 3.x turned out very well and the project has been growing pretty rapidly since the first 3.0 release in 2008. The EJB 3.1 Embedded Container and EJBs in .wars features came from OpenEJB. We had the first @Singleton implementation and hope to complete the rest of EJB 3.1 and certify web profile by Q4 this year. Failover and JMX monitoring have been under heavy development since January, are now complete, and will be released in 3.1.3 in a couple weeks. The failover is actually second generation, the first failover support was released in 3.1.1. There was significant remote performance work done in the 3.1.1 release as well bringing RPC calls up to a mean of 7300 TPS in our benchmarking.
Less important to some, but very important to others, Apache OpenEJB is not a corporately controlled open source project. The majority of committers are users who have earned commit and use OpenEJB at work. This has its advantages and disadvantages, but the bottom line is OpenEJB is filled with people who love it and use it and the community is just as open as the source.
UPDATE
In October 2011, we obtained Java EE 6 Web Profile certification with "Tomcat+OpenEJB", now called Apache TomEE.
Certified and with a clearer name, we hope this makes the stack easier to both understand and compare.
On a personal note, I view the comments in this thread as one of the major motivators for taking the certification step. Thank you to everyone at StackOverlfow for feedback which I find both encouraging and grounding. Connecting with this community has resulted in so much positive change in OpenEJB/TomEE.
我想问题是关于运行时环境的,但我仍然不明白更轻的应用程序意味着什么。内存占用?启动时间?部署时间?你实际上有什么问题?请定义光。
就其价值而言,我认为 GlassFish 3 是一个轻量级运行时,我对它的体验非常积极。来自产品数据表:
其次,我个人不喜欢弗兰肯斯坦方法,我相信通过真正的应用程序服务器获得的所有部分之间的粘合剂是附加值的一部分,这实际上就是我使用应用程序服务器的原因。
第三,我从未对 OpenEJB 进行过测试,我仅将其用于测试,从未计划将其用于生产,主要是因为它的声誉不佳。请参阅此评论,了解 Geronimo 在 TSS 上的表现(来自 Hani Suleiman ,如果它是腐蚀性的,请不要感到惊讶):
事情可能已经改变了,OpenEJB 可能已经改进了,至少有一点改进,但是:
出于所有这些原因,我不会考虑使用 Tomcat+OpenEJB 来代替 GlassFish,尤其是在没有问题需要解决的情况下。
相关问题
另请参阅
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.
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:
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.
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):
Things might have changed, OpenEJB has probably improved, at least a bit, but still:
For all these reasons, I wouldn't consider Tomcat+OpenEJB instead of GlassFish, especially if there is no problem to solve.
Related questions
See also
在我的简短测试中,我发现 glassfish 不够轻,无法满足我的需求(启动时间和内存使用情况)。到目前为止我对 openejb 很满意。
In my brief tests, I found glassfish not light enough for my needs (startup time and memory usage). I have been happy with openejb so far.
非常有趣的帖子。
这正是我们(公司)在三四年前尝试 OpenEJB 3.0 之前的观点!
我们现在对 OpenEJB 有了很好的体验,并且它在生产/开发中得到了广泛的应用。
它真的很轻且易于使用。感谢 OpenEJB,开发人员节省了大量时间(Matthew B. Jones 的帖子也是一个很好的反馈)。
该社区活跃、思想开放,随时准备通过来自用户真实反馈的有用功能来帮助和改进产品。
最后但并非最不重要的一点是,表演实际上很棒!
让·路易
Really interesting post.
That was exactly our (company) opinion before trying OpenEJB 3.0, three or four years ago!
We now have a good experience with OpenEJB and it's widely use in production/development.
It's really light and easy to use. Thanks to OpenEJB, developers save a lot of time (Matthew B. Jones' posts are also a nice feedback).
The community is active, open minded and all the time ready to help and improve the product with useful features coming from real feedback of users.
And last but not least, performances are actually great!
Jean-Louis
OpenEJB 作为独立应用程序服务器的轻量级嵌入式替代方案。我们将应用程序从 JBoss 和 Weblogic(它必须支持两者)移植到 Tomcat/OpenEJB,没有出现重大问题。性能测试显示出效果有所提高或没有变差。
OpenEJB 最大的限制是文档不完整。它的网站还不错(对于开源项目来说它实际上相当不错),但它无法与 JBoss、Glassfish 等相比。
您应该注意的另一件事是它使用 ActiveMQ 作为 JMS 提供程序,这是另一个开放的源项目。与 ActiveMQ 的集成很好,但存在一些限制。例如,您不能只升级到 ActiveMQ 的最新版本。
与往常一样,开源领域支持和文档的缺乏可以通过免费访问源代码和编写它的开发人员来弥补。
OpenEJB as a lightweight and embedded alternative to stand-alone application servers. We ported our application from JBoss and Weblogic (it had to support both) to Tomcat/OpenEJB without major problems. The performance tests showed gains or not worse results.
The biggest restriction of OpenEJB is incomplete documentation. Its web site is ok (it's actually pretty decent for open source project) but it can't compare to JBoss, Glassfish, etc.
Another thing that you should be aware of is that it uses ActiveMQ as a JMS provider, which is another open source project. The integration with ActiveMQ is nice but presents some restrictions. For example, you can't just upgrade to latest release of ActiveMQ.
Once again, as always in open source lack of support and documentation is compensated by free access to sources and developers who write it.
我认为我支持 David Blevins,因为 Glassfish 现在意味着 Oracle,而且我们都知道他们为 OC4J 留下的遗产。我担心 Glassfish 可能需要越来越多的硬件来提供相同的服务。
无论如何,最好的建议是:建立一个基准并亲自尝试这两种解决方案,这只需要不超过 20 小时的专家工作时间。
I think I stand by David Blevins in the sense that Glassfish now means Oracle, and we all know the legacy they left behind with OC4J. I fear Glassfish may require more and more hardware for the same service.
Anyway the best advice is: Set up a Benchmark and try both solutions yourself, it is a matter of no more than 20 hours of expert work.