public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
enlistResource();
if (useStatementCache) {
CacheKey cacheKey = new CacheKey(sql, columnIndexes);
PreparedStatement cachedStmt = jdbcPooledConnection.getCachedStatement(cacheKey);
if (cachedStmt == null) {
PreparedStatement stmt = delegate.prepareStatement(sql, columnIndexes);
cachedStmt = JdbcProxyFactory.INSTANCE.getProxyPreparedStatement(jdbcPooledConnection, stmt, cacheKey);
jdbcPooledConnection.putCachedStatement(cacheKey, cachedStmt);