74 F
Columbus
Saturday, July 31, 2021

Creating New Jakarta Persistence/JPA Applications

This post was originally published on this site

Java Enterprise Edition (Java EE) has gone through a major transformation and is now Jakarta EE. One of the most significant changes impacting developers is the namespace change from javax to jakarta. If you’re new to JPA or creating new JPA applications, you might be wondering how to create your persistence applications. Your two options are:

  1. Create your new applications using the new jakarta namespace (Jakarta Persistence 3.0).
  2. Create your new applications using the existing javax namespace (JPA 2.2 and earlier).

If you’re writing a new application, you might think that option 1 is the obvious choice especially to avoid having to migrate your application later. However, there are a few reasons developers might not be ready or want to do so. One reason to go with option 2 is that your favorite provider may not compatible with Jakarta Persistence 3.0 yet. For example, Hibernate is currently not a Jakarta Persistence 3.0 compatible implementation. Another reason is that there are no actual new features introduced in Jakarta Persistence 3.0. The main difference between JPA 2.2 and Jakarta Persistence 3.0 is the namespace change so there is no compelling reason to upgrade.

Whether you decide to go with option 1 or option 2, IntelliJ IDEA Ultimate will provide you an easy way to create your applications.

Option 1: Create your new applications using the new jakarta namespace

If you want to create your new applications using the new jakarta namespace, checkout Creating a Simple Jakarta Persistence Application video or blog post. In the tutorial, I create a new Jakarta Persistence 3.0 application and use EclipseLink as my provider.

Option 2: Create your new applications using the existing javax namespace

If you want to create your new applications using the javax namespace, checkout Creating a Simple JPA Application blog post. In the blog, I create a new JPA 2.2 application and use Hibernate as my provider.

The post Creating New Jakarta Persistence/JPA Applications first appeared on JetBrains Blog.

Related Articles

Improved IDE Performance, Better Debugging Experience, and More for Kotlin in Latest IntelliJ IDEA

Enjoy improved performance, a better coroutines debugging experience, WSL 2 and Run Targets support, and more improvements for Kotlin in IntelliJ IDEA 2021.2: IDE performance...

How to make mistakes in Go

The panel are joined by Teiva Harsanyi, author of 100 Go Mistakes, to talk about how best to make mistakes when writing Go. Discuss on...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

21,978FansLike
0FollowersFollow
0SubscribersSubscribe
- Advertisement -

Latest Articles

Improved IDE Performance, Better Debugging Experience, and More for Kotlin in Latest IntelliJ IDEA

Enjoy improved performance, a better coroutines debugging experience, WSL 2 and Run Targets support, and more improvements for Kotlin in IntelliJ IDEA 2021.2: IDE performance...

How to make mistakes in Go

The panel are joined by Teiva Harsanyi, author of 100 Go Mistakes, to talk about how best to make mistakes when writing Go. Discuss on...

PhpStorm 2021.2: Generics, Enums, Array Shapes, Inspections, Refactorings, and More

PhpStorm 2021.2 is now available! This major release introduces preliminary support for generics in PHP, enums for PHP 8.1, one-line array shapes, improved automatic formatting...

Kotlin in Education

More developers are choosing Kotlin every day. It is one of the fastest-growing programming languages according to GitHub, and one of the most in-demand...