aspose file tools*
The moose likes Tomcat and the fly likes Tomcat vs. Glassfish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat vs. Glassfish" Watch "Tomcat vs. Glassfish" New topic
Author

Tomcat vs. Glassfish

David Brossard
Ranch Hand

Joined: Jun 03, 2004
Posts: 109
Hi all,

A bit of googling didn't really help here.

I am trying to weigh the pros and cons of Tomcat vs. Glassfish.

My initial list of pros and cons:

Pros:
- lighter
- more widely adopted
- easier to use and deploy apps
- faster
- web server (implements servlet / JSP spec only)

Cons
- Glassfish seems richer in features
- Glassfish has management interface to configure many different aspects e.g. jdbc connectors
- Glassfish has built-in scalability features
- app server (implements J2EE spec fully)

Very limited list so far. Any further comments from you folks out there?

Cheers,
David.


No matter what they say in Ohio, we're still first in flight!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

Tomcat provides a subset of services than what GlassFish does. Typically these are Java EE services. For example, Tomcat doesn't support EJB deployments where as GlassFish does. Take a look at this FAQ entry http://www.coderanch.com/how-to/java/WebVsApplicationServer for more generic details.

[My Blog] [JavaRanch Journal]
Jason Cone
Greenhorn

Joined: Jul 21, 2004
Posts: 25
When you compare Tomcat and Glassfish you're comparing a web server to a full-blown JEE app server. The (Tomcat-derived, incidentally) web module in Glassfish is just one of the components of the app container. Tomcat implements the Servlet and JSP portions of the JEE spec. Glassfish implements the full JEE spec, including servlets and JSPs, but also modules for handling container-managed transactions, security, EJBs, asynchronous messaging (JMS), Connectors, web services, RMI, et cetera.

For many applications (e.g., a basic web application and some database connection pools), Tomcat, alone will be sufficient. However, if you need several of the features of the complete JEE stack, then an application server might be a better choice.



David Brossard
Ranch Hand

Joined: Jun 03, 2004
Posts: 109
Thanks for both responses. I do understand that Tomcat is not a full-blown J2EE server. But in the end, what does it mean to be full-blown? Can you add J2EE support to Tomcat by merely putting the J2EE API libs in Tomcat's lib folder and the J2EE implementation inside the targeted web app?
The link to the FAQ was very valuable, cheers!
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Can you add J2EE support to Tomcat by merely putting the J2EE API libs in Tomcat's lib folder and the J2EE implementation inside the targeted web app?

No. You can hook in certain components (like EJB via OpenEJB, JavaMail and JMS via JNDI, JPA runs fine as is, etc.), but Tomcat will never be a full JEE server. Many applications don't need one, though, and what with JPA, JMS and JavaMail being available if needed, having access to an actual JEE server isn't as important as it once was.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat vs. Glassfish