advancedSpring Internals — Bean Lifecycle & Proxies
How can Open Session in View hide performance bottlenecks until your database connection pool gets exhausted?
OSIV keeps the Hibernate session (and its DB connection) open for the entire HTTP request, including view rendering — lazy loading 'just works' anywhere in the request, but N+1 queries triggered by the view layer stay invisible, and every request holds a connection far longer than it needs to, exhausting the pool under load.
This is a Pro question
Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.
How can Open Session in View hide performance bottlenecks until your database connection pool gets exhausted?