LazyConnectionDataSourceProxy is designed to defer the acquisition of a physical JDBC Connection until it is actually needed.
However, the current implementation does not respect this lazy contract for the following Connection methods:
setClientInfo(String, String)
setClientInfo(Properties)
setNetworkTimeout(Executor, int)
When any of these methods is invoked on the proxy connection before the physical connection has been materialized, the proxy immediately calls getTargetConnection() to obtain the underlying physical connection and then delegates the call to it. This prematurely triggers the acquisition of the actual JDBC Connection, defeating the purpose of lazy loading.
Is this behavior intentional design? If not, please assign this issue to me. I would be happy to submit a pull request to enhance it.
LazyConnectionDataSourceProxyis designed to defer the acquisition of a physical JDBCConnectionuntil it is actually needed.However, the current implementation does not respect this lazy contract for the following
Connectionmethods:setClientInfo(String, String)setClientInfo(Properties)setNetworkTimeout(Executor, int)When any of these methods is invoked on the proxy connection before the physical connection has been materialized, the proxy immediately calls
getTargetConnection()to obtain the underlying physical connection and then delegates the call to it. This prematurely triggers the acquisition of the actual JDBCConnection, defeating the purpose of lazy loading.Is this behavior intentional design? If not, please assign this issue to me. I would be happy to submit a pull request to enhance it.