You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2014/12/10 15:55:28 UTC
[1/3] syncope git commit: [SYNCOPE-614] Moving confDAO access from
NotificationJob to NotificationManager
Repository: syncope
Updated Branches:
refs/heads/1_2_X c8921b36d -> 9d1607734
refs/heads/master 14be591b8 -> bac25e1a6
[SYNCOPE-614] Moving confDAO access from NotificationJob to NotificationManager
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/9d160773
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/9d160773
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/9d160773
Branch: refs/heads/1_2_X
Commit: 9d1607734850b852ada7a803c3f11a1bbf48273a
Parents: c8921b3
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Dec 10 15:55:05 2014 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Dec 10 15:55:05 2014 +0100
----------------------------------------------------------------------
.../syncope/core/notification/NotificationJob.java | 11 ++---------
.../syncope/core/notification/NotificationManager.java | 5 +++++
2 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/9d160773/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java b/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
index 6a78407..c45e95b 100644
--- a/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
+++ b/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
@@ -29,7 +29,6 @@ import org.apache.syncope.common.types.TraceLevel;
import org.apache.syncope.core.audit.AuditManager;
import org.apache.syncope.core.persistence.beans.NotificationTask;
import org.apache.syncope.core.persistence.beans.TaskExec;
-import org.apache.syncope.core.persistence.dao.ConfDAO;
import org.apache.syncope.core.persistence.dao.TaskDAO;
import org.apache.syncope.core.util.ExceptionUtil;
import org.quartz.DisallowConcurrentExecution;
@@ -58,7 +57,7 @@ public class NotificationJob implements Job {
}
- public static String DEFAULT_CRON_EXP = "0 0/5 * * * ?";
+ public static final String DEFAULT_CRON_EXP = "0 0/5 * * * ?";
/**
* Logger.
@@ -80,16 +79,10 @@ public class NotificationJob implements Job {
@Autowired
private TaskDAO taskDAO;
- /**
- * Configuration DAO.
- */
- @Autowired
- private ConfDAO confDAO;
-
private long maxRetries;
private void init() {
- maxRetries = confDAO.find("notification.maxRetries", "0").getValues().get(0).getLongValue();
+ maxRetries = notificationManager.getMaxRetries();
if (mailSender instanceof JavaMailSenderImpl
&& StringUtils.isNotBlank(((JavaMailSenderImpl) mailSender).getUsername())) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/9d160773/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java b/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
index b32265b..63b54ec 100644
--- a/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
+++ b/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
@@ -155,6 +155,11 @@ public class NotificationManager {
@Autowired
private ConnObjectUtil connObjectUtil;
+ @Transactional(readOnly = true)
+ public long getMaxRetries() {
+ return confDAO.find("notification.maxRetries", "0").getValues().get(0).getLongValue();
+ }
+
/**
* Create a notification task.
*
[2/3] syncope git commit: [SYNCOPE-614] Moving confDAO access from
NotificationJob to NotificationManager
Posted by il...@apache.org.
[SYNCOPE-614] Moving confDAO access from NotificationJob to NotificationManager
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/9d160773
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/9d160773
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/9d160773
Branch: refs/heads/master
Commit: 9d1607734850b852ada7a803c3f11a1bbf48273a
Parents: c8921b3
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Dec 10 15:55:05 2014 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Dec 10 15:55:05 2014 +0100
----------------------------------------------------------------------
.../syncope/core/notification/NotificationJob.java | 11 ++---------
.../syncope/core/notification/NotificationManager.java | 5 +++++
2 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/9d160773/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java b/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
index 6a78407..c45e95b 100644
--- a/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
+++ b/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
@@ -29,7 +29,6 @@ import org.apache.syncope.common.types.TraceLevel;
import org.apache.syncope.core.audit.AuditManager;
import org.apache.syncope.core.persistence.beans.NotificationTask;
import org.apache.syncope.core.persistence.beans.TaskExec;
-import org.apache.syncope.core.persistence.dao.ConfDAO;
import org.apache.syncope.core.persistence.dao.TaskDAO;
import org.apache.syncope.core.util.ExceptionUtil;
import org.quartz.DisallowConcurrentExecution;
@@ -58,7 +57,7 @@ public class NotificationJob implements Job {
}
- public static String DEFAULT_CRON_EXP = "0 0/5 * * * ?";
+ public static final String DEFAULT_CRON_EXP = "0 0/5 * * * ?";
/**
* Logger.
@@ -80,16 +79,10 @@ public class NotificationJob implements Job {
@Autowired
private TaskDAO taskDAO;
- /**
- * Configuration DAO.
- */
- @Autowired
- private ConfDAO confDAO;
-
private long maxRetries;
private void init() {
- maxRetries = confDAO.find("notification.maxRetries", "0").getValues().get(0).getLongValue();
+ maxRetries = notificationManager.getMaxRetries();
if (mailSender instanceof JavaMailSenderImpl
&& StringUtils.isNotBlank(((JavaMailSenderImpl) mailSender).getUsername())) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/9d160773/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java b/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
index b32265b..63b54ec 100644
--- a/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
+++ b/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
@@ -155,6 +155,11 @@ public class NotificationManager {
@Autowired
private ConnObjectUtil connObjectUtil;
+ @Transactional(readOnly = true)
+ public long getMaxRetries() {
+ return confDAO.find("notification.maxRetries", "0").getValues().get(0).getLongValue();
+ }
+
/**
* Create a notification task.
*
[3/3] syncope git commit: Merge branch '1_2_X'
Posted by il...@apache.org.
Merge branch '1_2_X'
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/bac25e1a
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/bac25e1a
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/bac25e1a
Branch: refs/heads/master
Commit: bac25e1a6254d35fac90e9f9ab90b3a6521d42b7
Parents: 14be591 9d16077
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Dec 10 15:55:12 2014 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Dec 10 15:55:12 2014 +0100
----------------------------------------------------------------------
.../syncope/core/notification/NotificationJob.java | 11 ++---------
.../syncope/core/notification/NotificationManager.java | 5 +++++
2 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------