Member-only story

Why the Industry is Moving Back to JDBC from JPA — This one will hurt a lot of developers.

Full Stack Developer
3 min read1 day ago

I recently attended a Spring event where experts who work directly with Oliver Drotbohm — a key figure in the Spring ecosystem — discussed an interesting trend: many teams, including those at Broadcom, are moving away from JPA (Hibernate) and switching back to JDBC.

This shift is gaining traction across various industries, especially in high-performance applications.

Photo by The Matter of Food on Unsplash

For years, JPA has been the go-to abstraction for database interactions in Spring applications, offering a streamlined approach to handling persistence. However, the overhead, performance bottlenecks, and lack of fine-grained controlare prompting developers to reconsider its use.

Let’s explore why this transition is happening.

The Core Reasons Behind the Shift

1. Performance Bottlenecks in JPA (Hibernate)

JPA introduces an abstraction layer over SQL, which can lead to serious performance issues:

Full Stack Developer

Written by Full Stack Developer

Everything you will need to crack your Java Interviews and more. Learn Java with me, I promise it's fun!

Responses (10)

Write a response

In China,MyBatis is popular, it kind of balances ORM and raw JDBC.

10

I disagree with some of the premise here. Using straight JDBC does allow you to optimize queries substantially and that’s a huge gain, but it is terrible for maintainability because your code becomes tightly coupled to the database. When you make…

46

I really don't understand why it's necessary to use JDBC when there is JOOQ.

2