VELOCITY-989 - Review data sources resource loading#62
Open
arkanovicz wants to merge 4 commits intomasterfrom
Open
VELOCITY-989 - Review data sources resource loading#62arkanovicz wants to merge 4 commits intomasterfrom
arkanovicz wants to merge 4 commits intomasterfrom
Conversation
…ningReader Calling ResultSet.getStatement() after ResultSet.close() is driver-dependent: DBCP2 returns null and the resulting NPE was silently swallowed, leaking the prepared statement and its connection. Fetch the statement reference before closing the result set.
…seObjectsFactory The CachingDatabaseObjectsFactory class was removed in 3484d89. Its javadoc @link was still dangling in DataSourceResourceLoader, along with an orphaned statements_pool_max_size config line in the example snippet. Restate the SPI contract: pooling and statement caching belong to the DataSource / JDBC driver, not to Velocity.
…y ; fix connection leaks on failures
eecc69d to
a513c4f
Compare
michael-o
requested changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address VELOCITY-989 in a different way (hopefully cleaner) than PR 57.
Mainly:
statement.getConnection()(which behaves inconsistently across different jdbc pools)DatabaseObjectsFactory, but makes it functional by use of a temporary class proxy