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 - Choosing Propagation and Isolation Levels
A comprehensive guide to transaction management using Spring Boot's @Transactional annotation, from fundamentals to practical application. Covers default behavior, the 7 propagation levels, the 4 isolation levels, and how to use them, along with solutions for common rollback failure patterns (checked exceptions, self-invocation) with real-world examples.