As developers, we are used to applying the @Transactional
annotation provided by the Spring framework and rely on the mechanisms implemented by the framework for transaction management. But is this enough?
Well, the answer is clear: No.
Tips, Expertise, Articles and Advice from the Pro's for Your Website or Blog to Succeed
As developers, we are used to applying the @Transactional
annotation provided by the Spring framework and rely on the mechanisms implemented by the framework for transaction management. But is this enough?
Well, the answer is clear: No.
In this article, we will discuss the Java persistence API configuration with EclipseLink and MySQL.
The Java Persistence API is a standard specification for ORM (Object Relational Mapping) implementations. Also, it shows how to define a PLAIN OLD JAVA OBJECT (POJO) as an entity and how to manage entities with relations.
Learning JPA is a road marked with a lot of questions. Some of the notorious questions include: "What is actually a persistence-unit?," "What is an extended persistence-context?," "Why is wrong to fetch read-only data as entities?," "Why should I care aboutRESOURCE_LOCAL
orJTA
?," and so on and forth.
This article targets people that are confused by the JPA transaction types,RESOURCE_LOCAL,
andJTA
. But, let's take it step by step.