org.springframework.jdbc.support.nativejdbc |
Provides a mechanism for extracting native implementations of JDBC
interfaces from wrapper objects that got returned from connection pools.
Can be used independently, for example in custom JDBC access code.
|
Java Source File Name | Type | Comment |
C3P0NativeJdbcExtractor.java | Class | Implementation of the
NativeJdbcExtractor 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. |
CommonsDbcpNativeJdbcExtractor.java | Class | Implementation of the
NativeJdbcExtractor interface for the
Jakarta Commons DBCP connection pool, version 1.1 or higher.
Returns the underlying native Connection, Statement, etc to application
code instead of DBCP's wrapper implementations. |
JBossNativeJdbcExtractor.java | Class | Implementation of the
NativeJdbcExtractor interface for JBoss,
supporting JBoss Application Server 3.2.4+.
Returns the underlying native Connection, Statement, etc to
application code instead of JBoss' wrapper implementations.
The returned JDBC classes can then safely be cast, e.g. |
Jdbc4NativeJdbcExtractor.java | Class | NativeJdbcExtractor implementation that delegates to JDBC 4.0's
unwrap method, as defined by
java.sql.Wrapper .
Note: Only use this when actually running against a JDBC 4.0 driver,
with a connection pool that supports the JDBC 4.0 API (i.e. |
NativeJdbcExtractor.java | Interface | Interface for extracting native JDBC objects from wrapped objects coming from
connection pools. |
NativeJdbcExtractorAdapter.java | Class | Abstract adapter class for the NativeJdbcExtractor interface,
for simplified implementation of basic extractors.
Basically returns the passed-in JDBC objects on all methods.
getNativeConnection checks for a ConnectionProxy chain,
for example from a TransactionAwareDataSourceProxy, before delegating to
doGetNativeConnection for actual unwrapping.
|
SimpleNativeJdbcExtractor.java | Class | Simple implementation of the
NativeJdbcExtractor interface.
Assumes a pool that wraps Connection handles but not DatabaseMetaData:
In this case, the underlying native Connection can be retrieved by simply
calling conHandle.getMetaData().getConnection() .
All other JDBC objects will be returned as passed in.
This extractor should work with any pool that does not wrap DatabaseMetaData,
and will also work with any plain JDBC driver. |
WebLogicNativeJdbcExtractor.java | Class | Implementation of the
NativeJdbcExtractor interface for WebLogic,
supporting WebLogic Server 8.1 and higher.
Returns the underlying native Connection to application code instead
of WebLogic's wrapper implementation; unwraps the Connection for native
statements. |
WebSphereNativeJdbcExtractor.java | Class | Implementation of the
NativeJdbcExtractor interface for WebSphere,
supporting WebSphere Application Server 5.1 and higher.
Returns the underlying native Connection to application code instead
of WebSphere's wrapper implementation; unwraps the Connection for
native statements. |
XAPoolNativeJdbcExtractor.java | Class | Implementation of the
NativeJdbcExtractor interface for
ObjectWeb's XAPool, as shipped with JOTM and used in JOnAS.
Returns underlying native Connections and native PreparedStatements to
application code instead of XAPool's wrapper implementations; unwraps the
Connection for native Statements and native CallableStatements.
The returned JDBC classes can then safely be cast, e.g. |