/** INTERNAL: Clears both implicit and explicit caches of OracleConnection */
 public void clearOracleConnectionCache(Connection conn) {
   if (conn instanceof OracleConnection) {
     OracleConnection oracleConnection = (OracleConnection) conn;
     try {
       if (oracleConnection.getImplicitCachingEnabled()) {
         oracleConnection.purgeImplicitCache();
       }
     } catch (SQLException ex) {
       // ignore
     }
     try {
       if (oracleConnection.getExplicitCachingEnabled()) {
         oracleConnection.purgeExplicitCache();
       }
     } catch (SQLException ex) {
       // ignore
     }
   }
 }
예제 #2
0
파일: OracleUtils.java 프로젝트: nyer/druid
 public static void purgeImplicitCache(Connection conn) throws SQLException {
   OracleConnection oracleConn = unwrap(conn);
   oracleConn.purgeImplicitCache();
 }