Top Description Fields Methods
org.springframework.jdbc.datasource

public Interface ConnectionProxy

extends Connection
Imports
java.sql.Connection

Subinterface of java.sql.Connection to be implemented by Connection proxies. Allows access to the underlying target Connection.

This interface can be checked when there is a need to cast to a native JDBC Connection such as Oracle's OracleConnection. Alternatively, all such connections also support JDBC 4.0's Connection#unwrap.

Author
Juergen Hoeller
Since
1.1
See Also
TransactionAwareDataSourceProxy, LazyConnectionDataSourceProxy, DataSourceUtils#getTargetConnection(java.sql.Connection)

Field Summary

Inherited from java.sql.Connection:
TRANSACTION_NONETRANSACTION_READ_COMMITTEDTRANSACTION_READ_UNCOMMITTEDTRANSACTION_REPEATABLE_READTRANSACTION_SERIALIZABLE

Method Summary

Modifier and TypeMethod and Description
public Connection

Returns:

the underlying Connection (never null)
getTargetConnection
()

Return the target Connection of this proxy.

Inherited from java.sql.Connection:
abortbeginRequestclearWarningsclosecommitcreateArrayOfcreateBlobcreateClobcreateNClobcreateSQLXMLcreateStatementcreateStatementcreateStatementcreateStructendRequestgetAutoCommitgetCataloggetClientInfogetClientInfogetHoldabilitygetMetaDatagetNetworkTimeoutgetSchemagetTransactionIsolationgetTypeMapgetWarningsisClosedisReadOnlyisValidnativeSQLprepareCallprepareCallprepareCallprepareStatementprepareStatementprepareStatementprepareStatementprepareStatementprepareStatementreleaseSavepointrollbackrollbacksetAutoCommitsetCatalogsetClientInfosetClientInfosetHoldabilitysetNetworkTimeoutsetReadOnlysetSavepointsetSavepointsetSchemasetShardingKeysetShardingKeysetShardingKeyIfValidsetShardingKeyIfValidsetTransactionIsolationsetTypeMap

Method Detail

getTargetConnectionback to summary
public Connection getTargetConnection()

Return the target Connection of this proxy.

This will typically be the native driver Connection or a wrapper from a connection pool.

Returns:Connection

the underlying Connection (never null)