我开始研究企业Java,我接下来的书提到它将使用JBoss。Netbeans与Glassfish一起发货。我以前使用过Tomcat。
这三个程序有什么不同?
我开始研究企业Java,我接下来的书提到它将使用JBoss。Netbeans与Glassfish一起发货。我以前使用过Tomcat。
这三个程序有什么不同?
当前回答
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.
其他回答
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)堆栈,包括企业JavaBeans和许多其他技术,这些技术对于开发企业Java应用程序的开发人员非常有用。
Tomcat的限制要大得多。可以这样想,JBoss是一个包含servlet容器和web服务器的Java EE堆栈,而Tomcat在很大程度上是一个servlet容器和web服务器。
你应该在Java EE企业应用中使用GlassFish。 需要考虑的一些事情:
web服务器的意思是:处理HTTP请求(通常来自 浏览器)。 一个Servlet容器(例如Tomcat)意味着:它可以处理 servlet和JSP。 一个应用服务器(例如GlassFish)意味着:*它可以管理 Java EE应用程序(通常包括servlet/JSP和ejb)。
Tomcat——由Apache社区运行——开源,有两种风格:
Tomcat—Web配置文件—轻量级,只是servlet容器,不支持Java EE特性,如EJB、JMS等。 Tomcat EE——这是一个经过认证的Java EE容器,它支持所有Java EE技术。
没有商业支持(只有社区支持)
JBoss -由RedHat运行 这是对JavaEE的全栈支持,它是经过认证的JavaEE容器。 这在内部包括Tomcat作为web容器。 这也有两种口味:
名为Application Server (AS)的社区版本——它只支持社区。 企业应用服务器(Enterprise Application Server, EAP)——为此,您可以使用基于订阅的许可证(这取决于服务器上的内核数量)。
Glassfish -由Oracle运行 这也是一个全栈认证的Java EE容器。它有自己的web容器(不是Tomcat)。 这是由甲骨文自己决定的,所以所有的新规格都将首先用Glassfish进行测试和实现。所以,它总是支持最新的规范。我不知道它的支持模型。
Tomcat只是一个servlet容器,也就是说,它只实现servlet和JSP规范。Glassfish和JBoss是完整的Java EE服务器(包括EJB、JMS等),Glassfish是最新Java EE 6堆栈的参考实现,但JBoss在2010年还没有完全支持它。
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.