diff --git a/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java b/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java index 5c46904be7..fe2638b540 100644 --- a/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java +++ b/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/OutgoingBatchService.java @@ -258,7 +258,11 @@ public void insertOutgoingBatch(ISqlTransaction transaction, OutgoingBatch outgo long batchId = outgoingBatch.getBatchId(); if (batchId <= 0) { - batchId = sequenceService.nextVal(Constants.SEQUENCE_OUTGOING_BATCH); + if (platform.supportsMultiThreadedTransactions()) { + batchId = sequenceService.nextVal(Constants.SEQUENCE_OUTGOING_BATCH); + } else { + batchId = sequenceService.nextVal(transaction, Constants.SEQUENCE_OUTGOING_BATCH); + } } transaction.prepareAndExecute(getSql("insertOutgoingBatchSql"), batchId, outgoingBatch.getNodeId(), outgoingBatch.getChannelId(), outgoingBatch.getStatus().name(), outgoingBatch.getLoadId(), outgoingBatch.isExtractJobFlag() ? 1 : 0,