Satya
Satya

Reputation: 1532

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

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?

Upvotes: 23

Views: 25077

Answers (4)

Oli
Oli

Reputation: 239810

Here's quite an old comparison. As such, the capabilities of each server have doubtless improved.

Edit: Here is a current comparison.

Both are more than stable enough for production use though. It's really going to come down to features.

Upvotes: 11

Philip Templeton
Philip Templeton

Reputation: 13

This may be a little dated and maybe even a little biased, but it's from Oracle. You can skip down to the section for comparing Glass Fish to Tom Cat

http://java.sun.com/developer/technicalArticles/glassfish/GFandMySQL_Part1.html

Upvotes: 1

StaxMan
StaxMan

Reputation: 116512

Big question is: why? What do you think you need that Glassfish will provide you over Tomcat or Jetty? Management utilities perhaps?

Most things you want beyond basic servlet container are easily pluggable.

So while Glassfish is fine as is, there is no point in moving "just because". Most production services I have built are on plain old servlet containers, using none of implementation-specific features.

Upvotes: 3

Johannes Schaub - litb
Johannes Schaub - litb

Reputation: 506965

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

Upvotes: 24

Related Questions