Vaadin Grid DataProvider and intermittent JDBC connection pool exhaustion
0 reputation · 23 Feb 2025, 22:44 UTC
Resource Management in Lazy Loading
Vaadin Flow uses DataProvider callbacks, specifically fetchFromBackEnd, to handle lazy loading for the Grid component. These callbacks execute on the UI thread to retrieve data pages from the database based on the current view.
Concurrency and Pool Capacity
In environments with high concurrent user volume, the way database connections are acquired and released within these callbacks can impact the JDBC connection pool. There is uncertainty regarding the optimal way to manage transaction boundaries when moving between manual CallbackDataProvider implementations and the managed SpringDataProvider integration.
What is the expected behavior of connection release when using a custom DataProvider compared to SpringDataProvider? Which pattern best prevents connection leakage during high-concurrency page requests in Vaadin Flow?