Today, we often work with Spring Boot and the Spring ecosystem, but you’ve probably heard of Java EE or Jakarta EE. So what is Java EE or Jakarta EE? Let’s find out together in this tutorial!
The first thing you need to know is that Jakarta EE is the name changed from Java EE. Jakarta EE is a set of specifications defined to serve enterprise applications.
Regarding the history of Jakarta EE:
- Jakarta EE began development as J2EE in 1999 by Sun Microsystems, and was later renamed Java EE in 2006.
- On January 27, 2010, Oracle completed its acquisition of Sun Microsystems, and in 2017, Oracle transferred Java EE to the Eclipse Foundation.
- From March 2018, the Eclipse Foundation renamed Java EE to Jakarta EE, and in September 2019, Jakarta EE 8 was released, fully compatible with Java EE 8.
- Before November 2020, Jakarta EE application packages started with javax.*. From November 2020, with the Jakarta EE 9 release, these packages were changed to jakarta.*.
The Jakarta EE specifications include modules such as:
- CDI (Dependency Injection)
- JPA (Persistence)
- Servlet
- RESTful Web Services (JAX-RS)
- Bean Validation
- JSON-B
- JSON-P
- Messaging (JMS)
- Security
These modules allow us to implement web applications, manipulate databases, send and receive messages with message queues, and perform user authentication and authorization.
Since these are specifications, implementations are needed to run Jakarta EE applications. Common examples include:
- Eclipse’s Glassfish,
- IBM’s Open Liberty,
- Payara (built from Glassfish),
- JBoss’s WildFly,
- Oracle’s WebLogic.
Other runtime servers you may be familiar with, such as Tomcat or Jetty, do not fully support Jakarta EE.
Jakarta EE is divided into three variants:
- Jakarta EE Core Profile, which includes RESTful Web Services, CDI Lite, JSON-P/B, and Interceptors;
- Jakarta EE Web Profile, which includes all Core Specs + Servlets, Pages, Faces, Persistence (JPA), and Transactions; and
- Jakarta EE Platform, which is full technologies, including all Web Specs + Enterprise Beans (EJB), Mail, Messaging (JMS), and Batch.
Depending on your needs, you can use different variations.
Here are some advantages and disadvantages of Jakarta EE:
Advantages:
- Standardized APIs: Jakarta EE defines standard APIs through its specification. Your application doesn’t depend on a single vendor implementation. The same code can be deployed to multiple different application servers.
- Mature enterprise ecosystem: Jakarta EE isn’t something new. It’s an evolution of Java EE, which has been used in enterprise applications for many years. It covers all the common requirements of enterprise applications. Instead of choosing libraries and frameworks for different needs, you can simply use Jakarta EE to fulfill them.
Disadvantages:
- Smaller community than Spring: Compared to the Spring ecosystem, Jakarta EE lacks documentation, tutorials, and community events. For beginners, the Spring Framework seems more accessible.
- Some application servers are complex: Jakarta EE defines the specification, but you also need to understand the runtime. For each application server, you also need to know how to configure data sources, server configuration, deployment, modules, and server administration. With Spring Boot, you only need to run the
java -jarcommand to launch the application.
The latest version of Jakarta EE is Jakarta EE 11!
