public interface

ConnectionProxy

implements Connection
org.springframework.jdbc.datasource.ConnectionProxy

Class Overview

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. Spring's NativeJdbcExtractorAdapter automatically detects such proxies before delegating to the actual unwrapping for a specific connection pool.

Summary

[Expand]
Inherited Constants
From interface java.sql.Connection
Public Methods
abstract Connection getTargetConnection()
Return the target Connection of this proxy.
[Expand]
Inherited Methods
From interface java.sql.Connection
From interface java.sql.Wrapper

Public Methods

public abstract 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
  • the underlying Connection (never null)