类 C3P0NativeJdbcExtractor
- java.lang.Object
- org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter
- org.springframework.jdbc.support.nativejdbc.C3P0NativeJdbcExtractor
- 所有已实现的接口:
NativeJdbcExtractor
public class C3P0NativeJdbcExtractor extends NativeJdbcExtractorAdapter
Implementation of theNativeJdbcExtractor
interface for the C3P0 connection pool.Returns underlying native Connections to application code instead of C3P0's wrapper implementations; unwraps the Connection for native Statements. The returned JDBC classes can then safely be cast, e.g. to
oracle.jdbc.OracleConnection
.This NativeJdbcExtractor can be set just to allow working with a C3P0 DataSource: If a given object is not a C3P0 wrapper, it will be returned as-is.
Note that this class requires C3P0 0.8.5 or later; for earlier C3P0 versions, use SimpleNativeJdbcExtractor (which won't work for C3P0 0.8.5 or later).
- 从以下版本开始:
- 1.1.5
- 作者:
- Juergen Hoeller
- 另请参阅:
C3P0ProxyConnection.rawConnectionOperation(java.lang.reflect.Method, java.lang.Object, java.lang.Object[])
,SimpleNativeJdbcExtractor
构造器概要
构造器 构造器 说明 C3P0NativeJdbcExtractor()
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Connection
doGetNativeConnection(Connection con)
Retrieve the Connection via C3P0'srawConnectionOperation
API, using thegetRawConnection
as callback to get access to the raw Connection (which is otherwise not directly supported by C3P0).static Connection
getRawConnection(Connection con)
This method is not meant to be used directly; it rather serves as callback method for C3P0's "rawConnectionOperation" API.boolean
isNativeConnectionNecessaryForNativeCallableStatements()
Returnfalse
by default.boolean
isNativeConnectionNecessaryForNativePreparedStatements()
Returnfalse
by default.boolean
isNativeConnectionNecessaryForNativeStatements()
Returnfalse
by default.从类继承的方法 org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter
getNativeCallableStatement, getNativeConnection, getNativeConnectionFromStatement, getNativePreparedStatement, getNativeResultSet, getNativeStatement
构造器详细资料
C3P0NativeJdbcExtractor
public C3P0NativeJdbcExtractor()
方法详细资料
getRawConnection
public static Connection getRawConnection(Connection con)
This method is not meant to be used directly; it rather serves as callback method for C3P0's "rawConnectionOperation" API.- 参数:
con
- a native Connection handle- 返回:
- the native Connection handle, as-is
isNativeConnectionNecessaryForNativeStatements
public boolean isNativeConnectionNecessaryForNativeStatements()
从类复制的说明:NativeJdbcExtractorAdapter
Returnfalse
by default.
isNativeConnectionNecessaryForNativePreparedStatements
public boolean isNativeConnectionNecessaryForNativePreparedStatements()
从类复制的说明:NativeJdbcExtractorAdapter
Returnfalse
by default.
isNativeConnectionNecessaryForNativeCallableStatements
public boolean isNativeConnectionNecessaryForNativeCallableStatements()
从类复制的说明:NativeJdbcExtractorAdapter
Returnfalse
by default.
doGetNativeConnection
protected Connection doGetNativeConnection(Connection con) throws SQLException
Retrieve the Connection via C3P0'srawConnectionOperation
API, using thegetRawConnection
as callback to get access to the raw Connection (which is otherwise not directly supported by C3P0).