Transaction Isolation is the "I" in ACID and defines the visibility of changes in concurrent transactions.
Serializable is the highest value and ensures absolute consistency.
Read Uncommitted provides the highest concurrency with low consistency. NONE comes with no consistency and indicates the lack of transaction support.
The transaction consistency does influence the business logic and has to be discussed with domain experts.
A low risk approach to set a proper Isolation Level is:
- Set the highest possible Isolation Level (
- Perform Stress Tests and measure the impact
- If the required throughput / performance cannot be met or deadlock occurs, escalate the problem, talk to domain experts and either change the business logic, or lower the Isolation Level
Thanks Pavan Madiraju for the question!
[See also an in-depth discussion in the "Real World Java EE Patterns--Rethinking Best Practices" book (Second Iteration, "Green Book"), page 19 in, chapter "The Concurrency Problem"]
Java EE 7 Workshops: Bootstrap, Effective, Architectures, June, 13th-15th, Munich's Airport
On demand workshops: Java EE 7 Bootstrap, Effective Java EE 7, Java EE 7 Testing and NEW: Java EE 7 Microservices are available for streaming