문제

Java Spring Mybatis I am trying to createDescriptor but i need raw Connection instead of "NewProxyConnection" can some one help me how can i get Oracle Connection object out of "NewProxyConnection" object

I come across method proxyCon.rawConnectionOperation(arg0, arg1, arg2) but i am unaware if i can use it. any help appreciated.

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


        }


        }
도움이 되었습니까?

해결책

Found solution, sharing with you all.

    C3P0NativeJdbcExtractor cp30NativeJdbcExtractor = new C3P0NativeJdbcExtractor(); 
    OracleConnection connection = (OracleConnection) cp30NativeJdbcExtractor.getNativeConnection(ps.getConnection()); 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top