public static void handleStaleStatement ( WSJdbcWrapper jdbcWrapper ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "Encountered a Stale Statement: " + jdbcWrapper ) ; if ( jdbcWrapper instanceof WSJdbcObject ) try { WSJdbcConnection connWrapper = ( WSJdbcConnection ) ( ( WSJdbcObject ) jdbcWrapper ) . getConnectionWrapper ( ) ; WSRdbManagedConnectionImpl mc = connWrapper . managedConn ; // Instead of closing the statements, mark them as // not poolable so that they are prevented from being cached again when closed. connWrapper . markStmtsAsNotPoolable ( ) ; // Clear out the cache. if ( mc != null ) mc . clearStatementCache ( ) ; } catch ( NullPointerException nullX ) { // No FFDC code needed; probably closed by another thread. if ( ! ( ( WSJdbcObject ) jdbcWrapper ) . isClosed ( ) ) throw nullX ; } }
Performs special handling for stale statements such as clearing the statement cache and marking existing statements non - poolable .