You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by cb...@apache.org on 2026/04/22 13:14:29 UTC
(velocity-engine) 02/03: VELOCITY-989 Clean up stale javadoc referencing dropped CachingDatabaseObjectsFactory
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch velocity-989
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git
commit 2e95b59e0272049d51f27ab8a18342b734bf72a7
Author: Claude Brisson <cl...@renegat.net>
AuthorDate: Mon Apr 20 18:56:37 2026 +0200
VELOCITY-989 Clean up stale javadoc referencing dropped CachingDatabaseObjectsFactory
The CachingDatabaseObjectsFactory class was removed in 3484d89e. 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.
---
.../runtime/resource/loader/DataSourceResourceLoader.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
index f15abcb3..4dbc071d 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
@@ -60,7 +60,6 @@
* resource.loader.ds.resource.timestamp_column = template_timestamp <br>
* resource.loader.ds.cache = false <br>
* resource.loader.ds.modification_check_interval = 60 <br>
- * resource.loader.ds.statements_pool_max_size = 50 <br>
* </code></pre>
* <p>Optionally, the developer can instantiate the DataSourceResourceLoader and set the DataSource via code in
* a manner similar to the following:</p>
@@ -124,10 +123,10 @@
* <p>Since Velocity 2.4, the handling of JDBC connections and prepared statements is delegated to the
* {@link org.apache.velocity.runtime.resource.loader.DatabaseObjectsFactory} instance. The default class for this
* database objects factory is {@link org.apache.velocity.runtime.resource.loader.DefaultDatabaseObjectsFactory},
- * which obtains a new connection from the data source and prepares statements at each query. You can configure this
- * resource loader to use the {@link org.apache.velocity.runtime.resource.loader.CachingDatabaseObjectsFactory} which
- * will keep a single connection and tries to reuse prepared statements.
- * statements</p>
+ * which obtains a new connection from the data source and prepares statements at each query. Connection pooling
+ * and statement caching, if needed, are the responsibility of the configured {@link javax.sql.DataSource} / JDBC
+ * driver; users who need them should configure their pool (DBCP2, Tomcat JDBC Pool, HikariCP, etc.) accordingly,
+ * or provide a custom {@link org.apache.velocity.runtime.resource.loader.DatabaseObjectsFactory} implementation.</p>
*
* @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
* @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>