[JAVA] Touch Glassfish 6 to commemorate the release of Jakarta EE 9

Introduction

The Java specification included Java SE and Java EE, but Java EE left the Oracle initiative and was donated to the Eclipse Foundation. Taking this opportunity, it became impossible to call the specification Java EE, and the specification name was changed to Jakarta EE. (There were twists and turns, but if you just break it down and just conclude, it looks like this)

--Jakarta EE site - https://jakarta.ee/

About Jakarta EE version and latest version

Since becoming Jakarta EE, there are Jakarta EE8, which has become almost a mirror of Java EE8, and Jakarta EE9, which was released this December.

--Jakarta EE 9 release page - https://jakarta.ee/release/9/

The Jakarta EE 9 page states that it has three characteristics.

About application server compatible with Jakarta EE9

The Jakarta EE homepage lists compatible application servers, but for now it's only GlassFish.

--Page that lists supported application servers - https://jakarta.ee/compatibility/#tab-9

And when I go to the GlassFish page (https://github.com/eclipse-ee4j/glassfish/releases), at the moment (2020/12/20), I can only download up to 6.0.0-RC3. Yes, even though Jakarta EE 9 has been released (specification released), the corresponding GlassFish has not been released as an official version. That wasn't the case with JavaEE. Let's understand that it's not that Glassfish's development speed has slowed down, but that the specification has been released faster (no longer concerned with simultaneous releases). .. ..

If you download this GlassFish 6.0.0-RC3 and unzip it, you can use it as an ordinary application server called GlassFish.

\$ java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment Corretto-8.275.01.1 (build 1.8.0_275-b01)
OpenJDK 64-Bit Server VM Corretto-8.275.01.1 (build 25.275-b01, mixed mode)

\$ tree . | head -30
.
├── META-INF
│   ├── LICENSE.md
│   └── NOTICE.md
├── README.txt
├── bin
│   ├── asadmin
│   ├── asadmin.bat
│   ├── debug-asadmin
│   └── debug-asadmin.bat
├── glassfish
│   ├── bin
│   │   ├── appclient
│   │   ├── appclient.bat
│   │   ├── appclient.js
│   │   ├── asadmin
│   │   ├── asadmin.bat
│   │   ├── capture-schema
│   │   ├── capture-schema.1m
│   │   ├── capture-schema.bat
│   │   ├── jspc
│   │   ├── jspc.bat
│   │   ├── package-appclient
│   │   ├── package-appclient.bat
│   │   ├── schemagen
│   │   ├── schemagen.bat
│   │   ├── startserv
│   │   ├── startserv.bat
│   │   ├── stopserv
│   │   ├── stopserv.bat

//When starting

sh bin/asadmin start-domain

Note that this version only works with Java 8. The first version of JakartaEE 9 was not in time for Java 11. .. Therefore, Jakarta EE 9 needs to run on Java 8. We plan to support Java 11 with a minor version upgrade called Jakarta EE 9.1.

--Draft for JakartaEE 9.1 - https://www.agilejava.eu/2020/12/18/planning-for-jakarta-ee-9-1/

About the difference from the source code of the application

Set Jakarta EE9 in maven's pom.xml as follows

        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-api</artifactId>
            <version>9.0.0</version>
            <scope>provided</scope>
        </dependency>

With this setting, you can develop based on Jakarta EE 9. As I explained earlier, Jakarta EE9 includes a Big Bang release from javax to the jakarta package, so javax cannot be used. .. ..

image.png

Therefore, you can compile by changing javax to jakartaee.

image.png

Now that the compilation is successful, you can confirm the operation by deploying to Glassfish.

By the way, what happens if you set the version to 8.0.0 on pom.xml, compile and build with the package name as javax, and deploy to Glassfish 6.0.0 RC3? The deployment itself does not cause an error, but the javax annotations are ignored. It's a little half-hearted movement, but does it mean that it has been made more flexible? .. Please see this video (https://www.youtube.com/watch?v=aSIQ6ONKJWs) for details on Glassfish6.0.

in conclusion

I thought that the official version of Glassfish 6.0.0 would be out around here, but it wasn't out yet. .. The West has already entered the Christmas holidays, so is it the beginning of the year? I would like to look forward to it.

--Source code used - https://github.com/omix222/jee9demo

Recommended Posts

Touch Glassfish 6 to commemorate the release of Jakarta EE 9
[Java] [Java EE] [Glassfish] (Continued) Style that doubts the cache of Glassfish
Three Reasons to Frustrate Before the Release of a Web Service
The secret to the success of IntelliJ IDEA
How to determine the number of parallels
How to sort the List of SelectItem
Output of the book "Introduction to Java"
The process of introducing Vuetify to Rails
How to find the cause of the Ruby error
I want to output the day of the week
[Rails] Button to return to the top of the page
Add empty data to the top of the list
Customize how to divide the contents of Recyclerview
Make a margin to the left of the TextField
The story of introducing Ajax communication to ruby
Set the time of LocalDateTime to a specific time
The story of raising Spring Boot 1.5 series to 2.1 series
I want to var_dump the contents of the intent
How to get today's day of the week
Change the timezone of the https-portal container to JST
Output of how to use the slice method
[Ruby] Code to display the day of the week
The story of adding the latest Node.js to DockerFile
How to display the result of form input
[Java] How to get the authority of the folder
First touch of the Files class (or Java 8)
Java Welcome to the Swamp of 2D Arrays
How to set the log level to be displayed in the release version of orhanobut / logger