You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by is...@apache.org on 2022/12/30 02:11:15 UTC

[airavata] branch develop updated: add transtion commit

This is an automated email from the ASF dual-hosted git repository.

isjarana pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/develop by this push:
     new 1c8b1ead6a add transtion commit
     new cd39efcb08 Merge pull request #370 from isururanawaka/metaschedular
1c8b1ead6a is described below

commit 1c8b1ead6a8e623004c45921fa60ce35f67eec4e
Author: Isuru Ranawaka <ir...@gmail.com>
AuthorDate: Thu Dec 29 21:10:22 2022 -0500

    add transtion commit
---
 .../apache/airavata/registry/core/repositories/AbstractRepository.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java
index 3d35149135..48fc4a41b0 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/repositories/AbstractRepository.java
@@ -168,7 +168,9 @@ public abstract class AbstractRepository<T, E, Id> {
            for(int i=0;i<params.length;i++){
                nativeQuery.setParameter((i+1),params[i]);
            }
+           entityManager.getTransaction().begin();
            nativeQuery.executeUpdate();
+           entityManager.getTransaction().commit();
         } catch(Exception e) {
             logger.error("Failed to execute transaction", e);
             throw e;