/** * Flush the statement cache. * Each statement must first be closed. */ public void clearStatementCache(AbstractSession session) { if (hasStatementCache()) { for (Statement statement : getStatementCache().values()) { try { statement.close(); } catch (SQLException exception) { // an exception can be raised if // a statement is closed twice. } } this.statementCache = null; } // Close cached dynamic statement. if (this.dynamicStatement != null) { try { this.dynamicStatement.close(); } catch (SQLException exception) { // an exception can be raised if // a statement is closed twice. } this.dynamicStatement = null; this.setIsDynamicStatementInUse(false); } }
/** * Flush the statement cache. * Each statement must first be closed. */ public void clearStatementCache(AbstractSession session) { if (hasStatementCache()) { for (Statement statement : getStatementCache().values()) { try { statement.close(); } catch (SQLException exception) { // an exception can be raised if // a statement is closed twice. } } this.statementCache = null; } // Close cached dynamic statement. if (this.dynamicStatement != null) { try { this.dynamicStatement.close(); } catch (SQLException exception) { // an exception can be raised if // a statement is closed twice. } this.dynamicStatement = null; this.setIsDynamicStatementInUse(false); } }
/** * Flush the statement cache. * Each statement must first be closed. */ public void clearStatementCache(AbstractSession session) { if (hasStatementCache()) { for (Statement statement : getStatementCache().values()) { try { statement.close(); } catch (SQLException exception) { // an exception can be raised if // a statement is closed twice. } } this.statementCache = null; } // Close cached dynamic statement. if (this.dynamicStatement != null) { try { this.dynamicStatement.close(); } catch (SQLException exception) { // an exception can be raised if // a statement is closed twice. } this.dynamicStatement = null; this.setIsDynamicStatementInUse(false); } }
Map statementCache = getStatementCache(); synchronized (statementCache) { statement = (PreparedStatement)statementCache.get(sql);
Map statementCache = getStatementCache(); synchronized (statementCache) { statement = (PreparedStatement)statementCache.get(sql);
Map<String, Statement> statementCache = getStatementCache(); synchronized (statementCache) { PreparedStatement preparedStatement = (PreparedStatement)statement;
if (((call == null) && getPlatform().shouldCacheAllStatements()) || ((call != null) && call.usesBinding(session) && call.shouldCacheStatement(session))) { Map<String, Statement> statementCache = getStatementCache(); synchronized (statementCache) { PreparedStatement preparedStatement = (PreparedStatement)statement;
if (((call == null) && getPlatform().shouldCacheAllStatements()) || ((call != null) && call.usesBinding(session) && call.shouldCacheStatement(session))) { Map<String, Statement> statementCache = getStatementCache(); synchronized (statementCache) { PreparedStatement preparedStatement = (PreparedStatement)statement;
if (call.usesBinding(session) && call.shouldCacheStatement(session)) { Map statementCache = getStatementCache(); synchronized (statementCache) { statement = (PreparedStatement)statementCache.get(call.getSQLString());
if (call.usesBinding(session) && call.shouldCacheStatement(session)) { Map statementCache = getStatementCache(); synchronized (statementCache) { statement = (PreparedStatement)statementCache.get(call.getSQLString());
if (call.usesBinding(session) && call.shouldCacheStatement(session)) { Map statementCache = getStatementCache(); synchronized (statementCache) { statement = (PreparedStatement)statementCache.get(call.getSQLString());