From 2940b232d4c0db8337346af9f2b572831db7687f Mon Sep 17 00:00:00 2001 From: Shashank Teotia Date: Mon, 2 Jul 2018 12:17:58 +0530 Subject: [PATCH] Issue #157 feat: saving ID in a new internal property --- .../java/io/opensaber/registry/dao/impl/RegistryDaoImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/registry/src/main/java/io/opensaber/registry/dao/impl/RegistryDaoImpl.java b/java/registry/src/main/java/io/opensaber/registry/dao/impl/RegistryDaoImpl.java index da2780e8a..fc073d912 100644 --- a/java/registry/src/main/java/io/opensaber/registry/dao/impl/RegistryDaoImpl.java +++ b/java/registry/src/main/java/io/opensaber/registry/dao/impl/RegistryDaoImpl.java @@ -98,7 +98,9 @@ public String addEntity(Graph entity, String label, String rootNodeLabel, String if (rootNodeLabel!=null && property!=null){ connectNodes(rootNodeLabel, label, property); } - tx.commit(); + synchronized(this){ + tx.commit(); + } logger.debug("RegistryDaoImpl : Entity added for transactional DB with rootNodeLabel : {}, label : {}, property : {}", rootNodeLabel, label, property); }else{ watch.start("RegistryDaoImpl.addOrUpdateVerticesAndEdges");