类 JBossNativeJdbcExtractor
- java.lang.Object
- org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter
- org.springframework.jdbc.support.nativejdbc.JBossNativeJdbcExtractor
- 所有已实现的接口:
NativeJdbcExtractor
public class JBossNativeJdbcExtractor extends NativeJdbcExtractorAdapter
Implementation of theNativeJdbcExtractor
interface for JBoss, supporting JBoss Application Server 3.2.4+. As of Spring 3.1.1, it also supports JBoss 7.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. to
oracle.jdbc.OracleConnection
.This NativeJdbcExtractor can be set just to allow working with a JBoss connection pool: If a given object is not a JBoss wrapper, it will be returned as-is.
- 从以下版本开始:
- 03.01.2004
- 作者:
- Juergen Hoeller
- 另请参阅:
org.jboss.resource.adapter.jdbc.WrappedConnection#getUnderlyingConnection
,org.jboss.resource.adapter.jdbc.WrappedStatement#getUnderlyingStatement
,org.jboss.resource.adapter.jdbc.WrappedResultSet#getUnderlyingResultSet
构造器概要
构造器 构造器 说明 JBossNativeJdbcExtractor()
This constructor retrieves JBoss JDBC wrapper classes, so we can get the underlying vendor connection using reflection.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Connection
doGetNativeConnection(Connection con)
Retrieve the Connection via JBoss'getUnderlyingConnection
method.CallableStatement
getNativeCallableStatement(CallableStatement cs)
Retrieve the Connection via JBoss'getUnderlyingStatement
method.PreparedStatement
getNativePreparedStatement(PreparedStatement ps)
Retrieve the Connection via JBoss'getUnderlyingStatement
method.ResultSet
getNativeResultSet(ResultSet rs)
Retrieve the Connection via JBoss'getUnderlyingResultSet
method.Statement
getNativeStatement(Statement stmt)
Retrieve the Connection via JBoss'getUnderlyingStatement
method.从类继承的方法 org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter
getNativeConnection, getNativeConnectionFromStatement, isNativeConnectionNecessaryForNativeCallableStatements, isNativeConnectionNecessaryForNativePreparedStatements, isNativeConnectionNecessaryForNativeStatements
构造器详细资料
JBossNativeJdbcExtractor
public JBossNativeJdbcExtractor()
This constructor retrieves JBoss JDBC wrapper classes, so we can get the underlying vendor connection using reflection.
方法详细资料
doGetNativeConnection
protected Connection doGetNativeConnection(Connection con) throws SQLException
Retrieve the Connection via JBoss'getUnderlyingConnection
method.
getNativeStatement
public Statement getNativeStatement(Statement stmt) throws SQLException
Retrieve the Connection via JBoss'getUnderlyingStatement
method.- 指定者:
getNativeStatement
在接口中NativeJdbcExtractor
- 覆盖:
getNativeStatement
在类中NativeJdbcExtractorAdapter
- 参数:
stmt
- the Statement handle, potentially wrapped by a connection pool- 返回:
- the underlying native JDBC Statement, if possible; else, the original Statement
- 抛出:
SQLException
- if thrown by JDBC methods
getNativePreparedStatement
public PreparedStatement getNativePreparedStatement(PreparedStatement ps) throws SQLException
Retrieve the Connection via JBoss'getUnderlyingStatement
method.- 指定者:
getNativePreparedStatement
在接口中NativeJdbcExtractor
- 覆盖:
getNativePreparedStatement
在类中NativeJdbcExtractorAdapter
- 参数:
ps
- the PreparedStatement handle, potentially wrapped by a connection pool- 返回:
- the underlying native JDBC PreparedStatement, if possible; else, the original PreparedStatement
- 抛出:
SQLException
- if thrown by JDBC methods
getNativeCallableStatement
public CallableStatement getNativeCallableStatement(CallableStatement cs) throws SQLException
Retrieve the Connection via JBoss'getUnderlyingStatement
method.- 指定者:
getNativeCallableStatement
在接口中NativeJdbcExtractor
- 覆盖:
getNativeCallableStatement
在类中NativeJdbcExtractorAdapter
- 参数:
cs
- the CallableStatement handle, potentially wrapped by a connection pool- 返回:
- the underlying native JDBC CallableStatement, if possible; else, the original CallableStatement
- 抛出:
SQLException
- if thrown by JDBC methods
getNativeResultSet
public ResultSet getNativeResultSet(ResultSet rs) throws SQLException
Retrieve the Connection via JBoss'getUnderlyingResultSet
method.- 指定者:
getNativeResultSet
在接口中NativeJdbcExtractor
- 覆盖:
getNativeResultSet
在类中NativeJdbcExtractorAdapter
- 参数:
rs
- the ResultSet handle, potentially wrapped by a connection pool- 返回:
- the underlying native JDBC ResultSet, if possible; else, the original ResultSet
- 抛出:
SQLException
- if thrown by JDBC methods