Removed transactional annotations from simple select queries.
Change-Id: Ifb8e17237b67e59a5247ee4bc1b62eeda046b2d9
Change-Id: Ifb8e17237b67e59a5247ee4bc1b62eeda046b2d9
diff --git a/core/Changes b/core/Changes
index 11265f7..8589452 100644
--- a/core/Changes
+++ b/core/Changes
@@ -8,6 +8,8 @@
- Added support for multiple cq parameters (margaretha, resolved #46)
13/12/2019
- Handled pipe errors and added tests (margaretha)
+20/12/2019
+ - Removed transactional annotations from simple select queries (margaretha)
# version 0.62.2
13/11/2019
diff --git a/core/src/main/java/de/ids_mannheim/korap/dao/AnnotationDao.java b/core/src/main/java/de/ids_mannheim/korap/dao/AnnotationDao.java
index 0c527d7..b7b576c 100644
--- a/core/src/main/java/de/ids_mannheim/korap/dao/AnnotationDao.java
+++ b/core/src/main/java/de/ids_mannheim/korap/dao/AnnotationDao.java
@@ -32,7 +32,6 @@
*
*/
@Repository
-@Transactional
public class AnnotationDao {
@PersistenceContext
@@ -154,6 +153,7 @@
}
+ @Transactional
public Annotation createAnnotation (String code, String type, String text,
String description) {
Annotation ann = new Annotation(code, type, text, description);
@@ -161,6 +161,7 @@
return ann;
}
+ @Transactional
public AnnotationLayer createAnnotationLayer (Annotation foundry,
Annotation layer) throws KustvaktException {
ParameterChecker.checkObjectValue(foundry, "foundry");
@@ -175,14 +176,17 @@
return annotationLayer;
}
+ @Transactional
public void updateAnnotationLayer (AnnotationLayer layer) {
entityManager.merge(layer);
}
+ @Transactional
public void updateAnnotationKey (AnnotationKey key) {
entityManager.merge(key);
}
+ @Transactional
public AnnotationKey createAnnotationKey (AnnotationLayer layer,
Annotation key) {
AnnotationKey annotation =
diff --git a/core/src/main/java/de/ids_mannheim/korap/dao/ResourceDao.java b/core/src/main/java/de/ids_mannheim/korap/dao/ResourceDao.java
index d12ff3f..da3298c 100644
--- a/core/src/main/java/de/ids_mannheim/korap/dao/ResourceDao.java
+++ b/core/src/main/java/de/ids_mannheim/korap/dao/ResourceDao.java
@@ -27,7 +27,6 @@
* @author margaretha
*
*/
-@Transactional
@Repository
public class ResourceDao {
@@ -67,6 +66,7 @@
}
}
+ @Transactional
public void createResource (String id, String germanTitle,
String englishTitle, String englishDescription,
Set<AnnotationLayer> layers) throws KustvaktException {
diff --git a/full/Changes b/full/Changes
index 030fdfb..f39835b 100644
--- a/full/Changes
+++ b/full/Changes
@@ -10,6 +10,8 @@
- Handled pipe errors and added tests (margaretha)
19/12/2019
- Updated create update user-group API (margaretha)
+20/12/2019
+ - Removed transactional annotations from simple select queries (margaretha)
# version 0.62.2
17/10/2019
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/AdminDaoImpl.java b/full/src/main/java/de/ids_mannheim/korap/dao/AdminDaoImpl.java
index 249f144..54cab51 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/AdminDaoImpl.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/AdminDaoImpl.java
@@ -22,7 +22,7 @@
* @author margaretha
*
*/
-@Transactional
+//@Transactional
@Repository
public class AdminDaoImpl implements AdminDao {
diff --git a/full/src/main/java/de/ids_mannheim/korap/dao/DefaultSettingDao.java b/full/src/main/java/de/ids_mannheim/korap/dao/DefaultSettingDao.java
index bc7afdd..858b7c7 100644
--- a/full/src/main/java/de/ids_mannheim/korap/dao/DefaultSettingDao.java
+++ b/full/src/main/java/de/ids_mannheim/korap/dao/DefaultSettingDao.java
@@ -23,7 +23,6 @@
* @author margaretha
*
*/
-@Transactional
@Repository
public class DefaultSettingDao {
@@ -41,6 +40,7 @@
* default settings in json
* @throws KustvaktException
*/
+ @Transactional
public void createDefaultSetting (String username, String settings)
throws KustvaktException {
ParameterChecker.checkStringValue(username, "username");
@@ -49,12 +49,14 @@
entityManager.persist(us);
}
+ @Transactional
public void updateDefaultSetting (DefaultSetting defaultSetting)
throws KustvaktException {
ParameterChecker.checkObjectValue(defaultSetting, "defaultSetting");
entityManager.merge(defaultSetting);
}
+ @Transactional
public void deleteDefaultSetting (String username)
throws KustvaktException {
ParameterChecker.checkObjectValue(username, "defaultSetting");