8 minutes read

Jakarta EE (Enterprise Edition) is the next level of learning Java. Jakarta EE knowledge allows us to work on web development, and create scalable, secure, and reliable applications for enterprises.

In this topic, we will talk about what Jakarta EE is, what it includes, its implementation, and what it has to do with Java EE.

Jakarta EE specification

Java is both a programming language and a name for the platform. The Java platform is an environment where a Java application is run. Among them are:

  • Java SE (Java Platform, Standard Edition) is used to develop and deploy of Java applications for desktops and servers.

  • Jakarta EE or Java EE (Java Platform, Enterprise Edition) is used for developing Java enterprise applications.

Java SE is a base for Jakarta EE. It includes Java Virtual Machine, Java Runtime Environment, and Java Development Kit. The Java SE APIs provide the core functionality of the Java programming language. It defines everything from objects to higher-level classes used for networking, security, database access, or graphical user interface.

Enterprise applications differ from standard ones in their scale, they need more security and reliability. As a rule, they are multi-level. The Java SE platform is not suitable for enterprise applications. In this case, the Jakarta EE platform provides greater opportunities for development.

Jakarta EE extends Java SE. All services and API available in Java SE are also available in Jakarta EE.

Jakarta EE provides APIs in a runtime environment for developing and running enterprise software. It is a set of specifications providing features for distributed computing, web services, reading, and writing from a database in a transactional way. It is used for e-commerce, accounting, and banking information systems.

Jakarta EE tiers

The functionality of enterprise applications is divided into isolated functionality areas (tiers). Jakarta EE could be divided into the following tiers: web, business, and data.

The web tier handles interactions between clients and business tiers. The most used specifications representing web tiers are Servlets. Servlets are Java classes that are used to extend the capabilities of a server. They handle HTTP requests and construct responses. It is a base component for all web interconnections in Jakarta EE.

The business tier comprises the core functionality of the application. Business tier specifications handle main business logic such as API calls, return values, and service invocations. Specifications that deal with business logic include Enterprise JavaBeans (EJB), Jakarta RESTful web services (JAX-RS), and Jakarta web service endpoints (JAX-WS). EJBs are modular, reusable components that can be easily composed into larger applications. It is a specification for writing and maintaining server components containing business logic. JAX-RS is a specification that provides support in creating web services according to the Representational State Transfer (REST) architectural pattern. It defines a set of annotations and APIs for creating RESTful web services. JAX-WS is a specification that provides support in creating Simple Object Access Protocol (SOAP) web services.

The data tier is the layer of the application that manages the storage and retrieval of data. Data tiers consist of database servers, file systems, and external web services. The Data tier in Jakarta EE is supported by a number of specifications and APIs, including Java Database Connectivity (JDBC), Java API for JSON Processing (JSON-P), Java Persistence API (JPA), and Java Transaction API (JTA).

JDBC is a low-level API. It provides a set of standard interfaces, classes, and methods for connecting to a database, sending queries and update statements, and processing the results. JSON-P is a Java API for parsing, generating, and querying JSON (JavaScript Object Notation) data. JPA is a specification responsible for Jakarta EE persistence. It accesses data in underlying data stores and maps that data to Java programming language objects. JTA is specification managing transactions.

There are also common specifications related to all the tiers, one of them is Context and Dependency Injection (CDI). Applications consist of a lot of components that interact with each other. CDI allows components to inject other components in a safe way. It manages the lifecycle and dependencies of objects in a Java application.

This is a lot to take in for the first acquaintance, but, on a brighter note, the knowledge of these technologies opens up wide opportunities for the developer!

Implementations of Jakarta EE specification

Jakarta EE specifications are a set of APIs, annotations, and other constructs. A specification is a set of abstract rules and guidelines. In order to use them, they must be implemented. Therefore, Jakarta EE needs implementation in order to provide a runtime environment for running and managing Jakarta EE applications. A Jakarta EE implementation typically includes an application server and a web server. But what is the difference between them?

A web server typically refers to a server that is responsible for serving static web content, such as HTML pages and files. This could include content such as images, videos, and other multimedia files.

Client server relationship diagram

An application server is a server that is used to host and run applications. This type of server typically provides features and services that are needed by applications, such as database access, transaction support, and messaging services. Most application servers have a web server as an integral part of them. That means the application server can do whatever the web server is capable of.

Client application server relationship

The core difference between them is that application servers have full support for the Jakarta EE specifications, whereas web servers support a small subset of them.

One of the most used web servers is Apache Tomcat. Another example is the Jetty web server is developed under the Eclipse Foundation.

Apache Tomcat logo

jetty logo

Some examples of Jakarta EE implementations of application servers include:

Eclipse GlassFish logo

Eclipse GlassFish

WildFly logo

payara server logo

Apache TomEE logo

Influence on other technologies

Jakarta EE has played an important role in the development of enterprise-level Java applications. Besides, it has influenced the growth of other technologies that are related to the Java platform.

Jakarta EE can be used as an API for standalone frameworks or libraries. For example, the Spring web framework includes support for Jakarta EE servlets. This allows developers to take advantage of the servlet API provided by Jakarta EE while also using the additional features and capabilities of the Spring framework to create web applications.

Another example of using Jakarta EE as an API for a standalone framework is by using its JAX-RS specification to create RESTful web services. The Jersey framework is a popular implementation of JAX-RS that provides a set of APIs for building RESTful web services.

From Java EE to Jakarta EE

To understand why Jakarta EE and Java EE are the same, let's look at history.

1998 — Enterprise Java was originally developed by Sun Microsystems and maintained under Java Community Process (JCP).

1999 — Java 2 Platform, Enterprise Edition (J2EE) 1.2 got released.

2006 — J2EE rebranded to Java Platform Enterprise Edition (Java EE) together with realize of new version 5.

2017 — Java EE 8 was realized for the last time under the Java EE name. This year Oracle moved Java EE to the open-source Eclipse foundation.

2018 — Java EE has officially been renamed to Jakarta EE.

Now at the sights of Java EE, Java 2EE, J2EE, or Jakarta we could tell that it is all names for the same thing: the sets of specifications for developing enterprise Java applications.

Conclusion

Jakarta EE is a powerful tool that allows the development of reliable, secure, multi-tiered, scalable, and network applications. It is based on Java SE and provides additional specifications like Servlets, EJB, JAX-RS, JAX-WS, JPA, and JTA.

Jakarta EE is an umbrella specification that aggregates all the others. Implementations of Jakarta EE can give access to all the specifications if needed a single application server. These implementations are GlassFish, Payara Server, TomEE, and WildFly. If we need a web server, our choice is TomCat or Jetty.

Jakarta EE gave new momentum for developing different technologies. Among them are Servlets in Spring web, and JAX-RS in Jersey.

32 learners liked this piece of theory. 2 didn't like it. What about you?
Report a typo