JPA/Hibernate Global Conversation with Spring AOP

The previous 2 articles were dedicated to the analysis of Spring @Transactional and @PersistenceContext internals.

In this article we will discuss about the JPA extended persistence context (Hibernate long session) pattern.  We’ll look at the pros and cosn and finally I will show a practical implementation using the TransactionSynchronizationManager class shown earlier in both articles
Read more of this post

Advertisements

Spring @PersistenceContext/@PersistenceUnit explained

This is the 2nd article of a serie on Spring code analysis.

Today we are going to dig into the @PersistenceContext annotation, widely used by JPA/Hibernate developers to inject an Entity Manager into their DAO classes.

Read more of this post

Spring @Transactional explained

Spring is a widely used framework today, bringing many powerfull features and extensions to the Java core stack. However most of people tend to use these features without understanding their underlying mechanism.

Since there is no “magic” in real life, we are going to dig into some Spring features related to Transaction and Database in this serie of articles.

This first article is dealing with the famous @Transactional annotation, saving the developers the burden of managing low level transaction code.
Read more of this post