Our support customers will sometimes ask, “What is the difference between Tomcat and TomEE,” but that’s not really the right question. It’s like asking which is better “Omelets or Eggs” or “JSP or Servlets”. You can’t have the first one without the second.
TomEE is Tomcat Plus
It’s easier to think of TomEE as the same thing as Tomcat plus some bells and whistles, because TomEE is built on top of Tomcat. Specifically, TomEE 8 is the complete Tomcat 9 distribution plus Jakarta EE 8 (formerly Java EE 8) specific APIs.
Tomcat is a powerful and hugely popular Java web server. It implements four Jakarta EE web specifications.
You can build complete dynamic web sites with Tomcat all by itself, but Tomcat is not synonymous with Jakarta EE. Tomcat, by itself, doesn’t even fulfill the minimum requirements for the Jakarta EE 8 Web Profile, but TomEE does target Jakarta EE 8 Web Profile. TomEE 8 extends Tomcat 9 and is focused on the requirements of Jakarta EE 8.
Note: At the time of this writing, TomEE 8 passes 96% of the Jakarta EE 8 Web Profile compatibility tests. Soon it will be 100% compatible. Come join us!
Jakarta EE Specifications in TomEE 8
So what is it that TomEE has that Tomcat does not? TomEE 8, the latest version, adds a lot enterprise technology that is required by the Jakarta EE 8 Web Profile, but isn’t found in Tomcat including:
- Jakarta EE Web Profile 8 (Targeted)
- Jakarta JSON Processing 1.1
- Jakarta JSON Binding Specification 1.0
- Jakarta Server Faces 2.3
- Jakarta Standard Tag Library
- Jakarta Interceptors 1.2
- Jakarta Batch 1.0
- Jakarta Concurrency 1.1
- Jakarta Contexts and Dependency Injection 2.0
- Jakarta Annotations 1.3
- Jakarta Bean Validation 2.0
- Jakarta Enterprise Beans 3.2
- Jakarta Connectors 1.7
- Jakarta Persistence 2.2 (WARNING: openjpa based distributions provide a JPA 2.0 runtime)
- Jakarta Messaging 2.0 (layer based on ActiveMQ 5 / JMS 1.1 for default distributions)
- Jakarta Transactions 1.3
- Jakarta Security 1.0
- Jakarta Authentication 1.1
- Jakarta Mail 1.6 (NOTE: EE 7 requires 1.5)
- Jakarta RESTful Web Services 2.1
- Jakarta Managed Beans 1.0
- Jakarta Enterprise Web Services 1.4
- Jakarta Debugging Support for Other Languages 1.0
Jakarta EE: Use Only What You Need!
All these APIs are important depending on the context, just as all the APIs in the Java SE are important depending on what you need. In Java SE if you don’t want to use a specific API (e.g. java.rmi), you don’t use it. There is no additional cognitive load because you can focus on what you need and ignore the rest. The same can be said of Jakarta EE. Yes, there is a lot there but you can focus on what you need. You don’t have to know about everything.
That said, if what you need is not there it can be painful to integrate it into the project especially in the context of all the other enterprise APIs. This is where Jakarta EE excels. The focus of the Jakarta EE platform is not to bundle a bunch of unrelated APIs. The purpose of Jakarta EE is to ensure that a variety of useful enterprise APIs work in harmony.
TomEE itself comes in four flavors, TomEE, TomEE JAX-RS, TomEE +, and TomEE PluME. We’ll talk more about these flavors and the versions of Jakarta EE that support in our next post, but for now you can assume that any flavor of TomEE is, at the very least, targeted to meet the requirements of the Jakarta EE 8 Web Profile.