Tomcat、JBoss 和 Glassfish 有什么区别?
我开始研究 Enterprise Java,我正在关注的书提到它将使用 JBoss。 Netbeans 附带 Glassfish。我以前用过Tomcat。
这三个程序有什么区别?
I am starting to look into Enterprise Java and the book I am following mentions that it will use JBoss. Netbeans ships with Glassfish. I have used Tomcat in the past.
What are the differences between these three programs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
Tomcat 只是一个servlet 容器,即它仅实现servlet 和JSP 规范。 Glassfish 和 JBoss 是完整的 Java EE 服务器(包括 EJB、JMS 等内容),Glassfish 是最新 Java EE 6 堆栈的参考实现,但 2010 年的 JBoss 尚未完全支持它。
Tomcat is just a servlet container, i.e. it implements only the servlets and JSP specification. Glassfish and JBoss are full Java EE servers (including stuff like EJB, JMS, ...), with Glassfish being the reference implementation of the latest Java EE 6 stack, but JBoss in 2010 was not fully supporting it yet.
Tomcat 只是一个 HTTP 服务器和 Java servlet 容器。 JBoss 和 GlassFish 是成熟的 Java EE 应用服务器,包括 EJB 容器和该堆栈的所有其他功能。另一方面,Tomcat 的内存占用量较小(约 60-70 MB),而那些 Java EE 服务器的重量为数百兆。 Tomcat 对于简单的 Web 应用程序或使用 Spring 等框架且不需要完整 Java EE 服务器的应用程序非常流行。 Tomcat 服务器的管理可以说更容易,因为移动部件更少。
然而,对于确实需要完整 Java EE 堆栈(或者至少可以轻松连接到 Tomcat 的更多部分)的应用程序...JBoss 和 GlassFish 是两个最流行的开源产品(第三个是 Apache Geronimo) ,IBM WebSphere 的免费版本就是在此基础上构建的)。 JBoss 拥有更大、更深的用户社区,以及更成熟的代码库。然而,JBoss 在实现当前 Java EE 规范方面明显落后于 GlassFish。另外,对于那些喜欢基于 GUI 的管理系统的人来说...GlassFish 的管理控制台非常流畅,而 JBoss 中的大多数管理都是通过命令行和文本编辑器完成的。 GlassFish 直接来自 Sun/Oracle,具有可提供的所有优势。 JBoss 不受 Sun/Oracle 的控制,但具有其所能提供的所有优势。
Tomcat is merely an HTTP server and Java servlet container. JBoss and GlassFish are full-blown Java EE application servers, including an EJB container and all the other features of that stack. On the other hand, Tomcat has a lighter memory footprint (~60-70 MB), while those Java EE servers weigh in at hundreds of megs. Tomcat is very popular for simple web applications, or applications using frameworks such as Spring that do not require a full Java EE server. Administration of a Tomcat server is arguably easier, as there are fewer moving parts.
However, for applications that do require a full Java EE stack (or at least more pieces that could easily be bolted-on to Tomcat)... JBoss and GlassFish are two of the most popular open source offerings (the third one is Apache Geronimo, upon which the free version of IBM WebSphere is built). JBoss has a larger and deeper user community, and a more mature codebase. However, JBoss lags significantly behind GlassFish in implementing the current Java EE specs. Also, for those who prefer a GUI-based admin system... GlassFish's admin console is extremely slick, whereas most administration in JBoss is done with a command-line and text editor. GlassFish comes straight from Sun/Oracle, with all the advantages that can offer. JBoss is NOT under the control of Sun/Oracle, with all the advantages THAT can offer.
您应该将GlassFish 用于 Java EE 企业应用程序。
需要考虑的一些事项:
Tomcat - 由 Apache 社区运行 - 开源,有两种风格:
没有可用的商业支持(仅社区支持)
JBoss - 由 RedHat 运行
这是对 JavaEE 的全栈支持,并且是经过认证的 Java EE 容器。
这包括 Tomcat 作为内部 Web 容器。
它也有两种风格:
Glassfish - 运行由甲骨文公司
这也是一个经过全栈认证的 Java EE 容器。它有自己的 Web 容器(不是 Tomcat)。
这来自 Oracle 本身,因此所有新规范都将首先使用 Glassfish 进行测试和实施。因此,它始终会支持最新的规范。我不知道它的支持模型。
You should use GlassFish for Java EE enterprise applications.
Some things to consider:
Tomcat - is run by Apache community - Open source and has two flavors:
No commercial support available (only community support)
JBoss - Run by RedHat
This is a full-stack support for JavaEE and it is a certified Java EE container.
This includes Tomcat as web container internally.
This also has two flavors:
Glassfish - Run by Oracle
This is also a full stack certified Java EE Container. This has its own web container (not Tomcat).
This comes from Oracle itself, so all new specs will be tested and implemented with Glassfish first. So, always it would support the latest spec. I am not aware of its support models.
jboss 和 glassfish 包含一个 servlet 容器(如 tomcat),但是两个应用程序服务器(jboss 和 glassfish)还提供一个 bean 容器(我想还有其他一些东西)
jboss and glassfish include a servlet container(like tomcat), however the two application servers (jboss and glassfish) also provide a bean container (and a few other things aswell I imagine)
当你阅读这些答案时,使用 Tomcat 似乎有点令人沮丧。然而,大多数人没有提到的是,您可以使用 tomcat 获得相同或几乎相同的用例,但这需要您添加所需的库(通过 Maven 或您使用的任何包含系统)。
我一直在使用 JPA、EJB 运行 tomcat,配置工作量非常小。
It seems a bit discouraging to use Tomcat when you read these answers. However what most fail to mention is that you can get to identical or almost identical use cases with tomcat but that requires you to add the libraries needed (through Maven or whatever include system you use).
I have been running tomcat with JPA, EJBs with very small configuration efforts.
JBoss 和 Glassfish 基本上是完整的 Java EE 应用服务器,而 Tomcat 只是一个 Servlet 容器。
JBoss、Glassfish 以及 WebSphere、WebLogic 等与 Tomcat 以及 Jetty 之间的主要区别在于完整应用程序服务器提供的功能。当您拥有全栈 Java EE 应用服务器时,您可以受益于您选择的供应商的所有实现,当然您还可以受益于 EJB、JTA、CDI(JAVA EE 6+)、JPA、JSF、JSP/Servlet等等。另一方面,使用 Tomcat,您只能从 JSP/Servlet 中受益。然而,如今使用 Spring 和 Guice 等高级框架,使用全栈应用服务器的许多主要优势都可以得到缓解,并且假设该框架之一与 Spring 生态系统一起使用,您可以从许多子系统中受益根据我的工作经验,该项目让我放弃使用全栈应用服务器,转而使用像 tomcat 这样的轻量级应用服务器。
JBoss and Glassfish are basically full Java EE Application Server whereas Tomcat is only a Servlet container.
The main difference between JBoss, Glassfish but also WebSphere, WebLogic and so on respect to Tomcat but also Jetty, was in the functionality that an full app server offer. When you had a full stack Java EE app server you can benefit of all the implementation of the vendor of your choice, and you can benefit of EJB, JTA, CDI(JAVA EE 6+), JPA, JSF, JSP/Servlet of course and so on. With Tomcat on the other hands you can benefit only of JSP/Servlet. However to day with advanced Framework such as Spring and Guice, many of the main advantage of using an a full stack application server can be mitigate, and with the assumption of a one of this framework manly with Spring Ecosystem, you can benefit of many sub project that in the my work experience let me to left the use of a full stack app server in favour of lightweight app server like tomcat.
JBoss 和 Tomcat 都是 Java servlet 应用服务器,但 JBoss 的功能远不止于此。两者之间的本质区别在于,JBoss 提供了完整的 Java 企业版 (Java EE) 堆栈,包括 Enterprise JavaBeans 和许多其他对开发企业 Java 应用程序的开发人员有用的技术。
Tomcat 的局限性要大得多。一种思考方式是,JBoss 是一个 Java EE 堆栈,其中包括 servlet 容器和 Web 服务器,而 Tomcat 在很大程度上是 servlet 容器和 Web 服务器。
Both JBoss and Tomcat are Java servlet application servers, but JBoss is a whole lot more. The substantial difference between the two is that JBoss provides a full Java Enterprise Edition (Java EE) stack, including Enterprise JavaBeans and many other technologies that are useful for developers working on enterprise Java applications.
Tomcat is much more limited. One way to think of it is that JBoss is a Java EE stack that includes a servlet container and web server, whereas Tomcat, for the most part, is a servlet container and web server.
Apache tomcat 只是一个唯一的 serverlet 容器,它不支持 Enterprise Java 应用程序 (JEE)。 JBoss 和 Glassfish 支持 JEE 应用程序,但 Glassfish 比 JBOSS 服务器重得多: 参考幻灯片
Apache tomcat is just an only serverlet container it does not support for Enterprise Java application(JEE). JBoss and Glassfish are supporting for JEE application but Glassfish much heavy than JBOSS server : Reference Slide