SPRING, JAKARTA EE, CDI - THE GOOD PARTS
summary
Beans and runtime aspects cause subtle, long-lived failures: classes with 18+ injected dependencies and occasional data loss from broken @Transactional behavior are common. The concrete fixes are constructor-based DI, drop field injection, replace request/session-scoped state, and prefer explicit factories or providers. Spring WebFlux + Reactor is usable without Spring context and runs in production for non-blocking endpoints; transactional work can be refactored to lambdas (transaction(fn)) and jOOQ/JDBC reduces JPA headaches. Migrate in small steps (embedded runtimes, Spring Boot, fewer beans).
AI-written summary · about
chapters (14)
- 0:00Introduction and background
- 7:13The problem with beans
- 13:54Constructor injection benefits
- 18:30Request and session scoped beans
- 21:40Transactional annotation pitfalls
- 25:32JPA entity state issues
- 28:20Stack Overflow fixes and magic
- 31:11Dynamic proxy and reflection risks
- 34:42Aspects and type safety
- 37:28Spring WebFlux without beans
- 40:40Java EE and Jakarta EE critique
- 42:04Clean architecture with manual DI
- 44:30Steps to reduce bean usage
- 47:19Alternatives and future trends
