Home » Author Archives: Vlad Mihalcea (page 3)

Author Archives: Vlad Mihalcea

Vlad Mihalcea is a software architect passionate about software integration, high scalability and concurrency challenges.

Hibernate locking patterns – How does OPTIMISTIC_FORCE_INCREMENT Lock Mode work

jboss-hibernate-logo

Introduction In my previous post, I explained how OPTIMISTIC Lock Mode works and how it can help us synchronize external entity state changes. In this post, we are going to unravel the OPTIMISTIC_FORCE_INCREMENT Lock Mode usage patterns. With LockModeType.OPTIMISTIC, the locked entity version is checked towards the end of the current running transaction, to make sure we don’t use a ...

Read More »

Hibernate locking patterns – How does Optimistic Lock Mode work

jboss-hibernate-logo

Explicit optimistic locking In my previous post, I introduced the basic concepts of Java Persistence locking. The implicit locking mechanism prevents lost updates and it’s suitable for entities that we can actively modify. While implicit optimistic locking is a widespread technique, few happen to understand the inner workings of explicit optimistic lock mode. Explicit optimistic locking may prevent data integrity ...

Read More »

How to get a 10,000 points StackOverflow reputation

career-logo

How it all started In spring 2014, I initiated the Hibernate Master Class project, focusing on best practices and well-established usage patterns. I then realized that all my previous Hibernate experience wouldn’t be enough for this task. I needed more than that. Hibernate has a very steep learning curve and tens of new StackOverflow questions are being asked on a ...

Read More »

A beginner’s guide to Java Persistence locking

java-interview-questions-answers

Implicit locking In concurrency theory, locking is used for protecting mutable shared data against hazardous data integrity anomalies. Because lock management is a very complex problem, most applications rely on their data provider implicit locking techniques. Delegating the whole locking responsibility to the database system can both simplify application development and prevent concurrency issues, such as deadlocking. Deadlocks can still ...

Read More »

Why you should pay developers to learn

software-development-2-logo

A true story We were having a meeting with a customer and he had just presented a project idea. He wanted us to give him a draft system architecture, supporting his project technical requirements. At one point, I was telling him that incremental development requires architecture evolution as well. When I said that finding the right architecture is also a ...

Read More »

A beginner’s guide to transaction isolation levels in enterprise Java

java-interview-questions-answers

Introduction A relational database strong consistency model is based on ACID transaction properties. In this post we are going to unravel the reasons behind using different transaction isolation levels and various configuration patterns for both resource local and JTA transactions.           Isolation and consistency In a relational database system, atomicity and durability are strict properties, while ...

Read More »

EAGER fetching is a code smell

java-interview-questions-answers

Introduction Hibernate fetching strategies can really make a difference between an application that barely crawls and a highly responsive one. In this post I’ll explain why you should prefer query based fetching instead of global fetch plans. Fetching 101 Hibernate defines four association retrieving strategies:     Fetching Strategy Description Join The association is OUTER JOINED in the original SELECT ...

Read More »

The downside of version-less optimistic locking

software-development-2-logo

Introduction In my previous post I demonstrated how you can scale optimistic locking through write-concerns splitting. Version-less optimistic locking is one lesser-known Hibernate feature. In this post I’ll explain both the good and the bad parts of this approach.         Version-less optimistic locking Optimistic locking is commonly associated with a logical or physical clocking sequence, for both ...

Read More »

Spring request-level memoization

spring-interview-questions-answers

Introduction Memoization is a method-level caching technique for speeding-up consecutive invocations. This post will demonstrate how you can achieve request-level repeatable reads for any data source, using Spring AOP only.         Spring Caching Spring offers a very useful caching abstracting, allowing you do decouple the application logic from the caching implementation details. Spring Caching uses an application-level ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.