/** * INTERNAL: * This method is used by the DatabaseAccessor to clear the batched statements in the * case that a non batchable statement is being executed */ public void executeBatchedStatements(AbstractSession session) { if (this.parameters.isEmpty()) { return; } //Bug#419326 : Added below clone, clear and clone.executeBatch(session) //Cloning the mechanism and clearing the current mechanism ensures that the current batch //is not visible to recursive calls to executeBatchedStatements(session). ParameterizedSQLBatchWritingMechanism currentBatch = (ParameterizedSQLBatchWritingMechanism) this.clone(); this.clear(); currentBatch.executeBatch(session); }
/** * INTERNAL: * This method is used by the DatabaseAccessor to clear the batched statements in the * case that a non batchable statement is being executed */ public void executeBatchedStatements(AbstractSession session) { if (this.parameters.isEmpty()) { return; } //Bug#419326 : Added below clone, clear and clone.executeBatch(session) //Cloning the mechanism and clearing the current mechanism ensures that the current batch //is not visible to recursive calls to executeBatchedStatements(session). ParameterizedSQLBatchWritingMechanism currentBatch = (ParameterizedSQLBatchWritingMechanism) this.clone(); this.clear(); currentBatch.executeBatch(session); }