天天看點

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容器(以及我想象的其他一些東西)