diff --git a/accession-commons-monotonic-generator-jpa/src/main/java/uk/ac/ebi/ampt2d/commons/accession/persistence/jpa/monotonic/service/ContiguousIdBlockService.java b/accession-commons-monotonic-generator-jpa/src/main/java/uk/ac/ebi/ampt2d/commons/accession/persistence/jpa/monotonic/service/ContiguousIdBlockService.java index 5f86d4e0..37a456d3 100644 --- a/accession-commons-monotonic-generator-jpa/src/main/java/uk/ac/ebi/ampt2d/commons/accession/persistence/jpa/monotonic/service/ContiguousIdBlockService.java +++ b/accession-commons-monotonic-generator-jpa/src/main/java/uk/ac/ebi/ampt2d/commons/accession/persistence/jpa/monotonic/service/ContiguousIdBlockService.java @@ -69,7 +69,7 @@ public ContiguousIdBlockService(ContiguousIdBlockRepository repository, Map blocks) { // release block if full blocks.forEach(block -> {if (block.isFull()) {block.releaseReserved();}}); @@ -77,7 +77,7 @@ public void save(Iterable blocks) { entityManager.flush(); } - @Transactional + @Transactional(isolation = Isolation.SERIALIZABLE) public void save(ContiguousIdBlock block) { // release block if full if (block.isFull()) {