天天看点

Tomcat,JBoss和Glassfish有什么区别?

本文翻译自:What is the difference between Tomcat, JBoss and Glassfish?

I am starting to look into Enterprise Java and the book I am following mentions that it will use JBoss.

我开始研究Enterprise Java,我正在阅读的书中提到它将使用JBoss。

Netbeans ships with Glassfish.

Netbeans随Glassfish一起发货。

I have used Tomcat in the past.

我过去使用过Tomcat。

What are the differences between these three programs?

这三个项目有什么区别?

#1楼

参考:https://stackoom.com/question/G2BM/Tomcat-JBoss和Glassfish有什么区别

#2楼

Both JBoss and Tomcat are Java servlet application servers, but JBoss is a whole lot more.

JBoss和Tomcat都是Java servlet应用服务器,但JBoss还有很多。

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.

两者之间的实质区别在于JBoss提供了完整的Java Enterprise Edition(Java EE)堆栈,包括Enterprise JavaBeans和许多其他技术,这些技术对于从事企业Java应用程序的开发人员非常有用。

Tomcat is much more limited.

Tomcat更受限制。

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.

想到它的一种方法是JBoss是一个包含servlet容器和Web服务器的Java EE堆栈,而Tomcat在很大程度上是一个servlet容器和Web服务器。

#3楼

JBoss and Glassfish are basically full Java EE Application Server whereas Tomcat is only a Servlet container.

JBoss和Glassfish基本上是完整的Java EE Application Server,而Tomcat只是一个Servlet容器。

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.

JBoss,Glassfish以及WebSphere,WebLogic等对Tomcat以及Jetty的主要区别在于完整应用服务器提供的功能。

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.

当您拥有一个完整的堆栈Java EE应用服务器时,您可以从所选供应商的所有实现中受益,您当然可以从EJB,JTA,CDI(JAVA EE 6 +),JPA,JSF,JSP / Servlet中受益等等。

With Tomcat on the other hands you can benefit only of JSP/Servlet.

另一方面,使用Tomcat,您只能受益于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.

然而,对于使用Spring和Guice等高级框架的日子,使用完整堆栈应用程序服务器的许多主要优势可以减轻,并且假设这个框架中的一个具有Spring Ecosystem的男子气概,您可以受益于许多子项目,在我的工作经验让我离开使用完整的堆栈应用服务器,支持像tomcat这样的轻量级应用服务器。

#4楼

You should use GlassFish for Java EE enterprise applications .

您应该使用GlassFish for Java EE企业应用程序 。

Some things to consider:

有些事情需要考虑:
A web Server means: Handling HTTP requests (usually from browsers). Web服务器意味着: 处理HTTP请求(通常来自浏览器)。 A Servlet Container (eg Tomcat ) means: It can handle servlets & JSP. Servlet容器 (例如Tomcat )意味着: 它可以处理servlet和JSP。 An Application Server (eg GlassFish ) means: *It can manage Java EE applications (usually both servlet/JSP and EJBs). 应用程序服务器 (例如GlassFish )意味着:*它可以管理Java EE应用程序(通常是servlet / JSP和EJB)。

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

Tomcat - 由Apache社区运行 - 开源,有两种风格:
  1. Tomcat - Web profile - lightweight which is only servlet container and does not support Java EE features like EJB, JMS etc. Tomcat - Web配置文件 - 轻量级,它只是servlet容器,不支持EJB,JMS等Java EE功能。
  2. Tomcat EE - This is a certified Java EE container, this supports all Java EE technologies. Tomcat EE - 这是一个经过认证的Java EE容器,它支持所有Java EE技术。

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.

JBoss - 由RedHat运行这是对JavaEE的全栈支持,它是一个经过认证的Java EE容器。

This includes Tomcat as web container internally.

这包括内部的Tomcat作为Web容器。

This also has two flavors:

这也有两种风格:
  1. Community version called Application Server (AS) - this will have only community support. 社区版本称为Application Server(AS) - 这将只有社区支持。
  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.) 企业应用服务器(EAP) - 为此,您可以拥有基于订阅的许可证(它基于您在服务器上拥有的核心数量。)

Glassfish - Run by Oracle This is also a full stack certified Java EE Container.

Glassfish - 由Oracle运行这也是一个经过完整堆栈认证的Java EE容器。

This has its own web container (not Tomcat).

它有自己的Web容器(不是Tomcat)。

This comes from Oracle itself, so all new specs will be tested and implemented with Glassfish first.

这来自Oracle本身,因此所有新规范将首先使用Glassfish进行测试和实施。

So, always it would support the latest spec.

所以,它总是支持最新规范。

I am not aware of its support models.

我不知道它的支持模型。

#5楼

Tomcat is just a servlet container, ie it implements only the servlets and JSP specification.

Tomcat只是一个servlet容器,即它只实现了servlet和JSP规范。

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.

Glassfish和JBoss是完整的Java EE服务器(包括EJB,JMS等......),Glassfish是最新Java EE 6堆栈的参考实现,但是2010年的JBoss还没有完全支持它。

#6楼

jboss和glassfish包含一个servlet容器(如tomcat),但是两个应用程序服务器(jboss和glassfish)也提供了一个bean容器(以及我想象的其他一些东西)