Tomcat、JBoss 和 Glassfish 有什么区别?

发布于 2024-09-25 13:16:50 字数 104 浏览 7 评论 0原文

我开始研究 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 技术交流群。

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

发布评论

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

评论(8

ㄖ落Θ余辉 2024-10-02 13:16:50

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.

波浪屿的海角声 2024-10-02 13:16:50

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.

你与清晨阳光 2024-10-02 13:16:50

您应该将GlassFish 用于 Java EE 企业应用程序
需要考虑的一些事项:

网络服务器意味着:处理 HTTP 请求(通常来自
浏览器)。

Servlet 容器(例如 Tomcat)意味着:它可以处理
servlet 和JSP。

应用程序服务器(例如GlassFish)意味着:*它可以管理
Java EE 应用程序(通常是 servlet/JSP 和 EJB)。


Tomcat - 由 Apache 社区运行 - 开源,有两种风格:

  1. Tomcat - Web 配置文件 - 轻量级,只是 servlet 容器,不支持 EJB 等 Java EE 功能, JMS 等
  2. Tomcat EE - 这是经过认证的 Java EE 容器,支持所有 Java EE 技术。

没有可用的商业支持(仅社区支持)

JBoss - 由 RedHat 运行
这是对 JavaEE 的全栈支持,并且是经过认证的 Java EE 容器。
这包括 Tomcat 作为内部 Web 容器。
它也有两种风格:

  1. 称为应用程序服务器 (AS) 的社区版本 - 这将仅具有社区支持。
  2. 企业应用服务器 (EAP) - 为此,您可以拥有基于订阅的许可证(它基于您服务器上拥有的核心数量。)

Glassfish - 运行由甲骨文公司
这也是一个经过全栈认证的 Java EE 容器。它有自己的 Web 容器(不是 Tomcat)。
这来自 Oracle 本身,因此所有新规范都将首先使用 Glassfish 进行测试和实施。因此,它始终会支持最新的规范。我不知道它的支持模型。

You should use GlassFish for Java EE enterprise applications.
Some things to consider:

A web Server means: Handling HTTP requests (usually from
browsers).

A Servlet Container (e.g. Tomcat) means: It can handle
servlets & JSP.

An Application Server (e.g. GlassFish) means: *It can manage
Java EE applications (usually both servlet/JSP and EJBs).


Tomcat - is run by Apache community - Open source and has two flavors:

  1. Tomcat - Web profile - lightweight which is only servlet container and does not support Java EE features like EJB, JMS etc.
  2. Tomcat EE - This is a certified Java EE container, this supports all Java EE technologies.

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:

  1. Community version called Application Server (AS) - this will have only community support.
  2. Enterprise Application Server (EAP) - For this, you can have a subscription-based license (It's based on the number of Cores you have on your servers.)

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.

另类 2024-10-02 13:16:50

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)

孤城病女 2024-10-02 13:16:50

当你阅读这些答案时,使用 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.

漆黑的白昼 2024-10-02 13:16:50

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.

只等公子 2024-10-02 13:16:50

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.

北方的巷 2024-10-02 13:16:50

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

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