/** * INTERNAL: * This method is used by the DatabaseAccessor to execute and clear the batched statements in the * case that a non batchable statement is being executed */ public void executeBatchedStatements(AbstractSession session) { if (this.sqlStrings.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). DynamicSQLBatchWritingMechanism currentBatch = (DynamicSQLBatchWritingMechanism) this.clone(); this.clear(); currentBatch.executeBatch(session); }
/** * INTERNAL: * This method is used by the DatabaseAccessor to execute and clear the batched statements in the * case that a non batchable statement is being executed */ public void executeBatchedStatements(AbstractSession session) { if (this.sqlStrings.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). DynamicSQLBatchWritingMechanism currentBatch = (DynamicSQLBatchWritingMechanism) this.clone(); this.clear(); currentBatch.executeBatch(session); }