Mybati是如何从NewProxyConnection中获取连接

Mybati是如何从NewProxyConnection中获取连接,connection,mybatis,ibatis,spring-jdbc,Connection,Mybatis,Ibatis,Spring Jdbc,Java Spring Mybatis我正在尝试创建描述符,但我需要原始连接而不是“NewProxyConnection”,有人能帮助我如何从“NewProxyConnection”对象中获取Oracle连接对象吗 我遇到了方法proxyCon.rawConnectionOperation(arg0、arg1、arg2),但我不知道是否可以使用它。谢谢你的帮助 public class MarketListTypeHandler implements TypeHandler { // othe

Java Spring Mybatis我正在尝试创建描述符,但我需要原始连接而不是“NewProxyConnection”,有人能帮助我如何从“NewProxyConnection”对象中获取Oracle连接对象吗

我遇到了方法proxyCon.rawConnectionOperation(arg0、arg1、arg2),但我不知道是否可以使用它。谢谢你的帮助

public class MarketListTypeHandler implements TypeHandler {

// other override methods



        public void setParameter(PreparedStatement ps, int i, Object parameter, JdbcType jdbcType) throws SQLException {


                NewProxyConnection proxyCon = (NewProxyConnection) ps.getConnection();
                    StructDescriptor structDescriptor = StructDescriptor.createDescriptor("mkt_list_rec", proxyCon);
    // rest of the code goes here


        }


        }

找到解决方案,与大家分享

    C3P0NativeJdbcExtractor cp30NativeJdbcExtractor = new C3P0NativeJdbcExtractor(); 
    OracleConnection connection = (OracleConnection) cp30NativeJdbcExtractor.getNativeConnection(ps.getConnection());