4. What Is an Application Server? – Introducing Jakarta EE CDI: Contexts and Dependency Injection for Enterprise Java Development

© Luqman Saeed 2020
Luqman SaeedIntroducing Jakarta EE CDIhttps://doi.org/10.1007/978-1-4842-5642-8_4

4. What Is an Application Server?

Luqman Saeed
(1)
Accra, Ghana
 
The previous chapter talked about what a JSR reference implementation is. The definition of Java EE also mentioned that it is a collection of abstract specifications. Java EE itself is a Java Specification Request.
Better still, Java EE is what is termed an umbrella JSR in that it encapsulates some JSRs. So Java EE 7, for instance, is JSR 342. Java EE 8 is JSR 366. So Java EE itself is a JSR that goes through the JCP JSR process and is subject to the requirements of every JSR.
Flowing from this idea and remembering that the JSR process requires every JSR to have a reference implementation, this means Java EE as an umbrella JSR must also have a reference implementation.
The implementation of the umbrella JSR or Java EE is commonly referred to as an application server. An app server is a concrete implementation of the Java EE spec that you can actually run your code on. The reference implementation of Java EE is the Glassfish Application Server.
An application server generally abstracts the developer away from a lot of mundane stuff that you would have had to manage on your own, like data-source pooling, caching, clustering, and other overheads.
The application server must also pass the TCK to be fully certified as being compliant with the given umbrella JSR. An app server is also the basis for the portability of Java EE. As a developer, you generally are encouraged to code against the javax.* packages, which are the standard Java EE packages.
Because an app server is subject to a standard, using the Java EE package means you can swap out application servers and your code will generally run with little to no modifications. This is compelling if you think about it.
For starters, no single application vendor can lock you in. Because you can swap out application servers, you can theoretically change vendors at any time should you be dissatisfied with your current vendor.
There are many application vendors out there, some free, some costly. Popular among the open source ones is Payara Server (see http://payara.fish), a Glassfish-derived, fully patched application server that is freely available for download.
Java EE is an abstract spec and its concrete realization or implementation is called an application server. As a JSR, the required reference implementation of Java EE is the Glassfish Application Server.