Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would you compare Apache Tomcat & Glassfish as production servers?

Tags:

I have a J2EE-based system which is running currently on Apache Tomcat. We are in discussions to move our production servers to the Glassfish server.

Can someone share their experiences with either of them?

like image 640
Satya Avatar asked Nov 29 '08 18:11

Satya


People also ask

What is the purpose of Apache Tomcat?

Apache Tomcat, also known as Tomcat Server, proves to be a popular choice for web developers building and maintaining dynamic websites and applications based on the Java software platform. It's reportedly called 'Tomcat' web server because the founder saw it as an animal that could take care of and fend for itself.

What is the difference between Java and Tomcat?

Tomcat vs. Tomcat users will need to deploy a JDK and properly configure the JAVA_HOME variable to run. Both Java application servers are open source and are served by the ASF, but only Tomcat requires the additional resources and requirements that enterprises will need to manage.

What type of server is Apache Tomcat?

Coming from IBM: Apache Tomcat is an open source application server that executes Java Servlets, renders and delivers web pages that include JavaServer Page code, and serves Java Enterprise Edition (Java EE) applications. Released in 1998, Tomcat is the most widely used open source Java application server.

Is Apache Tomcat a HTTP server?

Apache Tomcat (called "Tomcat" for short) is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. Tomcat provides a "pure Java" HTTP web server environment in which Java code can run.


1 Answers

They are not really comparable.

Apache Tomcat is not a J2EE Server. It's merely a Servlet Container for Web-Applications. Nothing more. If you need J2EE API implementations, you have to take those from elsewhere. For example by using the Apache Geronimo Server which uses Tomcat as its container, or by taking the JAR files from Glassfish.

Glassfish is a complete Java Application Server with implementation for APIs like JPA, EJBs and more. Glassfish contains a Servlet Engine initially used by Tomcat, but they improved it (don't know what exactly). More recent glassfish servers use another container using grizzly which uses the NIO API for input/output and scales quite well. As far as i know, the Glassfish Servlet Engine is more performant. Here i've found a nice benchmark (it's a bit old though):

http://weblogs.java.net/blog/sdo/archive/2007/05/how_to_test_con.html

like image 61
Johannes Schaub - litb Avatar answered Sep 25 '22 02:09

Johannes Schaub - litb