Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cloud-Native Development and Migration to Jakarta EE

You're reading from   Cloud-Native Development and Migration to Jakarta EE Transform your legacy Java EE project into a cloud-native application

Arrow left icon
Product type Paperback
Published in Oct 2023
Publisher Packt
ISBN-13 9781837639625
Length 198 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
David Vlijmincx David Vlijmincx
Author Profile Icon David Vlijmincx
David Vlijmincx
Ron Veen Ron Veen
Author Profile Icon Ron Veen
Ron Veen
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: History of Java EE and Jakarta EE
2. Chapter 1: The History of Enterprise Java FREE CHAPTER 3. Chapter 2: Introducing the Cargo Tracker Application 4. Part 2: Modern Jakarta EE
5. Chapter 3: Moving from Java EE to Jakarta EE 6. Chapter 4: Modernizing Your Application with the Latest Features 7. Chapter 5: Making Your Application Testable 8. Part 3: Embracing the Cloud
9. Chapter 6: Introduction to Containers and Docker 10. Chapter 7: Meet Kubernetes 11. Chapter 8: What Is Cloud Native? 12. Chapter 9: Deploying Jakarta EE Applications in the Cloud 13. Chapter 10: Introducing MicroProfile 14. Index 15. Other Books You May Enjoy Appendix A: Java EE to Jakarta EE names
1. Appendix B: As a Service

Java EE 5, the first user-friendly version

This thing that hampered Java EE most of all was the sheer amount of configuration that you had to provide. All of these configurations had to be done in so-called XML deployment configuration files. We refer you to the documentation at https://docs.oracle.com/cd/E13211_01/wle/dd/ddref.htm, should you be interested in the content of the files.

For a container-managed entity bean, for instance, you had to specify each of the methods that were exported, its type parameters, and the return value.

It was not uncommon to have these configuration files being more than 300–400 lines of XML. This was called configuration hell, and this is where Java EE (back then still called J2EE) got its reputation in the developer community for being bloated.

Developers got so frustrated with this type of configuration that alternatives arose. The rise of the now very famous Spring Framework can be attributed to exactly these feelings. The Spring Framework itself required some XML configuration, but it wired up a lot of parts automatically for developers. Back then, what the Spring Framework did mostly, next to adding dependency injection, was wiring up the different components.

In 2005, version 5 of Java EE was released. This was the first time that J2EE was rebranded Java EE, but more importantly, it introduced annotations for the first time. Annotations allowed you to specify certain configuration options already in the code, thus providing a reasonable default setting. Now, it only was required to specify the situations where the configuration should divert from these default values. This is called convention over configuration, and it immensely reduces the amount of configuration required.

Another improvement was that you could now simply annotate a bean with, for instance, @Local, to define it as a local EJB. Again, dozens of lines of configuration were saved.

This was actually part of the introduction of the EJB3 specification. It was revolutionary in that sense that it deprecated the traditional entity beans in favor of the Java Persistence API(JPA).

JPA was heavily influenced by frameworks such as Hibernate, which provided an object-relational persistence approach. This meant that the mapping between database fields and Java fields was done by the framework now; no longer was application code required to achieve this mapping. This is known as Object-Relational Mapping (ORM).

With Java EE version 5, a very competitive and, maybe for the first time, very developer-friendly version of the specification became available. Suddenly, developing Java EE applications was not something just for very experienced developers anymore.

You have been reading a chapter from
Cloud-Native Development and Migration to Jakarta EE
Published in: Oct 2023
Publisher: Packt
ISBN-13: 9781837639625
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image