Enterprise Java

Migrating to Jakarta EE 9

Jakarta EE 9 is out, and with it the namespace change from javax.* to jakarta.*. When we talk about the namespace change, we mostly talk about changing the import statements in your code when migrating to Jakarta EE 9. But there is more to it. I have created a slightly more advanced “Hello, World” application in order to highlight a couple more. I won’t claim that these are all areas, but I hope I have touched most…

The Complete Duke application provides a RESTful endpoint that produces a JSON message using Jakarta RESTful Web Services 3.0, which in turn uses Jakarta JSON Binding 2.0 to generate the JSON response. The message is fetched through Stateless Jakarta Enterprise Bean 4.0 and Jakarta Persistence API 3.0 from a relational database. To spice it up, a Jakarta CDI 3.0 Extension is used to produce a log message at deployment.

While this may seem like slightly overkill for a “Hello, World” application, but it is also a very good example of the different areas of your codebase that are affected by the new namespace:
– Maven dependencies
– Import statements and fully qualified class names
– XML Schema namespaces
– Properties
– Bootstrapping
– Dynamic data

During one of the Studio Jakarta EE 15-minute sessions of JakartaOne Livestream 2020, I will convert Complete Duke from Jakarta EE 8 to Jakarta EE 9 in 15 minutes or less!

The code is available on GitHub where there is a step-by-step guide you can follow to perform the same migration as I will do live during JakartaOne Livestream 2020. This is a session you will want to attend!

Published on Java Code Geeks with permission by Ivar Grimstad, partner at our JCG program. See the original article here: Migrating to Jakarta EE 9

Opinions expressed by Java Code Geeks contributors are their own.

Ivar Grimstad

Ivar Grimstad is an experienced software architect focusing on Enterprise Java. He is participating in the Java Community Process as a member of the Expert Groups for JSR 368 (JMS 2.1), JSR 371 (MVC 1.0), JSR 375 (Java EE Security API). He is also a member of the NetBeans Dream Team.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Back to top button