You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by mm...@apache.org on 2019/12/09 14:20:29 UTC

[syncope] branch master updated: SYNCOPE-1523: JPAConnInstanceDAO: mark find()/authFind() methods… (#145)

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

mmoayyed pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/master by this push:
     new 94462a6  SYNCOPE-1523: JPAConnInstanceDAO: mark find()/authFind() methods… (#145)
94462a6 is described below

commit 94462a6e1d6c7f784a73e091c451a3e5ce6e15c4
Author: Misagh Moayyed <mm...@gmail.com>
AuthorDate: Mon Dec 9 18:20:24 2019 +0400

    SYNCOPE-1523: JPAConnInstanceDAO: mark find()/authFind() methods… (#145)
---
 .../apache/syncope/core/persistence/jpa/dao/JPAConnInstanceDAO.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConnInstanceDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConnInstanceDAO.java
index 4be0788..9f4e6e5 100644
--- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConnInstanceDAO.java
+++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAConnInstanceDAO.java
@@ -36,6 +36,7 @@ import org.apache.syncope.core.spring.security.DelegatedAdministrationException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
 
 @Repository
 public class JPAConnInstanceDAO extends AbstractDAO<ConnInstance> implements ConnInstanceDAO {
@@ -50,11 +51,13 @@ public class JPAConnInstanceDAO extends AbstractDAO<ConnInstance> implements Con
     @Autowired
     private ConnectorRegistry connRegistry;
 
+    @Transactional(readOnly = true)
     @Override
     public ConnInstance find(final String key) {
         return entityManager().find(JPAConnInstance.class, key);
     }
 
+    @Transactional(readOnly = true)
     @Override
     public ConnInstance authFind(final String key) {
         ConnInstance connInstance = find(key);