Spring Hibernate

Spring Hibernate Integration

Prevent Lost Updates in Database Transaction using Spring Hibernate

Carvia Tech | May 20, 2019 | 5 min read | 428 views

When a user is updating a row in database, other users must be notified/blocked from updating the stale data. Hibernate can use 2 strategies to handle such concurrent updates - Optimistic Locking & Pessimistic Locking. Even if you are using spring, hibernate will take care of the concurrency management.

Read Article

How to implement thread safe table backed global counter in spring hibernate?

Carvia Tech | July 28, 2018 | 4 min read | 311 views

How to implement thread safe table backed global counter in spring hibernate?

Read Article

Prevent Order Placement if Produce Price Changes inbetween

Carvia Tech | December 31, 2017 | 1 min read | 107 views

Prevent Order Placement if Produce Price Changes inbetween

Read Article

No two threads shall pick up the same task from database table using Hibernate

Carvia Tech | December 31, 2017 | 1 min read | 126 views

No two threads shall pick up the same task from database table using Hibernate

Read Article

What is N+1 problem in Hibernate, how will you identify and solve it?

Carvia Tech | December 23, 2017 | 4 min read | 279 views

N+1 problem is a performance issue in Object Relational Mapping that fires multiple Select Queries in database for a single select query at application layer. Hibernate provides multiple ways to identify and prevent this problem.

Read Article