Class DefaultDatabaseObjectsFactory

java.lang.Object
org.apache.velocity.runtime.resource.loader.DefaultDatabaseObjectsFactory
All Implemented Interfaces:
DatabaseObjectsFactory

@Deprecated public class DefaultDatabaseObjectsFactory extends Object implements DatabaseObjectsFactory
Deprecated.
Database objects factory which obtains a new connection from the data source and prepares a statement at each call.

The returned PreparedStatement is a proxy that remembers the connection it was created from and returns it via Statement.getConnection(). This keeps the releaseStatement(String, PreparedStatement) contract correct across JDBC pool implementations — in particular Tomcat JDBC Pool, whose default facade returns the unwrapped driver connection and would bypass the pool wrapper on close.