Class SimpleConnectionHandle
- java.lang.Object
- org.springframework.jdbc.datasource.SimpleConnectionHandle
- All Implemented Interfaces:
ConnectionHandle
public class SimpleConnectionHandle extends Object implements ConnectionHandle
Simple implementation of theConnectionHandleinterface, containing a given JDBC Connection.- Since:
- 1.1
- Author:
- Juergen Hoeller
Constructor Summary
Constructors Constructor Description SimpleConnectionHandle(Connection connection)Create a new SimpleConnectionHandle for the given Connection.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection()Return the specified Connection as-is.voidreleaseConnection(Connection con)This implementation is empty, as we're using a standard Connection handle that does not have to be released.StringtoString()
Constructor Detail
SimpleConnectionHandle
public SimpleConnectionHandle(Connection connection)
Create a new SimpleConnectionHandle for the given Connection.- Parameters:
connection- the JDBC Connection
Method Detail
getConnection
public Connection getConnection()
Return the specified Connection as-is.- Specified by:
getConnectionin interfaceConnectionHandle
releaseConnection
public void releaseConnection(Connection con)
This implementation is empty, as we're using a standard Connection handle that does not have to be released.- Specified by:
releaseConnectionin interfaceConnectionHandle- Parameters:
con- the JDBC Connection to release