Transaction Articles
3 articles about Transaction. Explore Spring Boot implementation, design, and operations across related topics.
-
How to Fix LazyInitializationException in Spring Boot + JPA - Causes and Solutions for "could not initialize proxy - no Session"
Solve the LazyInitializationException (could not initialize proxy - no Session) that crashes the moment you access a lazily-loaded association in Spring Data JPA, working backwards from how Hibernate sessions and transaction boundaries operate. Compares the four proper approaches—JOIN FETCH, @EntityGraph, DTO projection, and @Transactional—and provides criteria for making decisions without resorting to open-in-view=true or switching to EAGER.
-
How to Safely Process Large Data with Spring Batch - Introductory Guide to Job/Step/Chunk Processing
A guide to implementing large-scale batch processing with Spring Batch, complete with sample code that even beginners can follow. Covers the basic structure of Job/Step/ItemReader/ItemWriter, memory-efficient implementation using chunk processing, transaction management, and error handling with skip and retry, all using the latest syntax compatible with Spring Boot 3.x.
-
Understanding Transaction Management with @Transactional in Spring Boot - How to Use Propagation Levels and Isolation Levels
A comprehensive guide to transaction management using the @Transactional annotation in Spring Boot, from basics to practical usage. Covers default behavior, all 7 propagation levels, 4 isolation levels, and common failure patterns where rollback does not work (checked exceptions, self-invocation) with real examples.