What's the difference between Glassfish and Apache Tomcat?
-
apache or glasfish widely used?
-
Answer:
http://glassfish.java.net/ is the reference implementation for a Java EE application server, which includes such technologies as Servlets, EJBs, JPA, JSF, JMS and comes bundled by default with the Java EE SDK download from Oracle. http://tomcat.apache.org/ has been traditionally viewed as Java EE 'lite'âthat is, it's a Web server and servlet container, but with little else in the way of 'heavyweight' Java EE. Again, traditionally, a lot of organizations developing Java Web applications gravitated towards Tomcat (over other, full-stack Java EE servers such as GlassFish or JBoss) for its simplicity of operation, low overhead and quick startup and deployment timesâall of which help reduce friction during development. I say 'traditionally' because the latest versions of even full-blown application servers such as GlassFish or JBoss have reduced much of the overhead, startup delays and complexity of operation making them just as convenient to use even during development. Additionally, Java EE 6 introduced the concept of the more lightweight Java EE Web Profile which maintains 'canonical' Java EE compatibility but specifies a narrower and more lightweight set of technologies. Apache themselves have released http://tomee.apache.org/apache-tomee.html, an all-Apache stack aimed at Java EE 6 Web Profile certification. In other words, there are very few technical reasons to prefer Tomcat alone over, say, GlassFish at this point, if you only need a Servlet container. In fact, GlassFish essentially uses a derivative of Tomcat 'under the hood' thus both share the same Catalina servlet container. Both are open source, and free to use, but while Tomcat uses the http://www.apache.org/licenses/, GlassFish is dual licensed under the http://glassfish.java.net/public/CDDL+GPL_1_1.html. Both are widely-supported by popular IDEs such as Eclipse or NetBeans, again easing the change, deploy, test cycle during development. Both are also well-supported by command-line driven build tools such as Ant or Maven which means you can easily deploy to them continuously using a continuous integration service such as Jenkins. In theory, there is very little you can do using GlassFish that you can't do on Tomcat with all the additional libraries or frameworks that you'll need. Need JPA/ORM? Drop Hibernate or EclipseLink into to Tomcat / your app. Need distributed transactions and two-phase commit? Drop Atomikos TransactionsEssentials or JBossTS in. Need a JMS message queue? Drop in ApacheMQ or OpenJMS. The advantage of the above approach is you can pick and match your choice of implementation/provider to suit your particular needs. The obvious disadvantage is now you have to configure them all by hand, and, more importantly, you have to worry about having them all co-exist peacefully and function properly (which can be harder than it sounds when it comes to shared or conflicting dependencies). Bottom line, if you just need to get up and running with Servlets, either GlassFish or Tomcat will work fine. If you, at any point, see yourself needing any of the other rich features provided by the Java EE Full Profile, then GlassFish has all that out of the box.
Alistair Israel at Quora Visit the source
Other answers
Both were built by and subsequently open-sourced by Sun. Both act as the reference implementation for various Java standards: Tomcat is (or was) the RI for the Servlet specification, and Glassfish is the RI for the Java EE standard (which includes Servlet). Tomcat is now built and maintained by the Apache software foundation. Glassfish continues to be built and maintained by Oracle. For the sake of full disclosure, I work at Oracle. The opinions and views expressed in this post are my own, and do not necessarily reflect the opinions or views of my employer.
Cameron Purdy
Related Q & A:
- What's the difference between Fullmetal Alchemist and Fullmetal Alchemist: Brotherhood?Best solution by Yahoo! Answers
- What's the difference between prim and dijkstra's algorithm?Best solution by Stack Overflow
- What's the difference between Current (I) and Potential Difference (V?Best solution by diffen.com
- What does it mean to be unresponsive? What's the difference between unresponsive and unconscious?Best solution by answers.yahoo.com
- For a U.S. Passport, what's the difference exactly between a passport book and a passport card?Best solution by ChaCha
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.