syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacom...@apache.org
Subject [1/2] syncope git commit: [SYNCOPE-668] JobInstanceLoader is able to return task id and report id starting from its job name. Removing unnecessary failover configuration during spring initialzation
Date Wed, 20 May 2015 11:56:48 GMT
Repository: syncope
Updated Branches:
  refs/heads/master 665aaf39d -> eb99e243b


[SYNCOPE-668] JobInstanceLoader is able to return task id and report id starting from its
job name. Removing unnecessary failover configuration during spring initialzation


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1d6451b5
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1d6451b5
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1d6451b5

Branch: refs/heads/master
Commit: 1d6451b5c4178e7d5a368d10af6df82055d95386
Parents: 4f7746a
Author: giacomolm <giacomolm@hotmail.it>
Authored: Wed May 20 12:41:53 2015 +0200
Committer: giacomolm <giacomolm@hotmail.it>
Committed: Wed May 20 12:41:53 2015 +0200

----------------------------------------------------------------------
 .../apache/syncope/core/init/JobInstanceLoader.java  |  4 ++--
 .../syncope/core/quartz/SpringBeanJobFactory.java    | 15 ---------------
 2 files changed, 2 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/1d6451b5/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java b/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java
index 894ed53..27f0579 100644
--- a/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java
+++ b/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java
@@ -92,11 +92,11 @@ public class JobInstanceLoader {
     }
 
     public static Long getTaskIdFromJobName(final String name) {
-        return getIdFromJobName("taskJob[0-9]+", name, 7);
+        return getIdFromJobName(name, "taskJob[0-9]+", 7);
     }
 
     public static Long getReportIdFromJobName(final String name) {
-        return getIdFromJobName("reportJob[0-9]+", name, 9);
+        return getIdFromJobName(name, "reportJob[0-9]+", 9);
     }
 
     public static String getJobName(final Task task) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/1d6451b5/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java b/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java
index 9fe4b85..8bad776 100644
--- a/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java
+++ b/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java
@@ -56,21 +56,6 @@ public class SpringBeanJobFactory extends org.springframework.scheduling.quartz.
     protected Object createJobInstance(final TriggerFiredBundle bundle) throws Exception
{
         final ApplicationContext ctx = ((ConfigurableApplicationContext) schedulerContext.get("applicationContext"));
 
-        // Try to re-create job bean from underlying task (useful for managing failover scenarios)
-        if (!ctx.containsBean(bundle.getJobDetail().getKey().getName())) {
-            Long taskId = JobInstanceLoader.getTaskIdFromJobName(bundle.getJobDetail().getKey().getName());
-            if (taskId != null) {
-                JobInstanceLoader jobInstanceLoader = ctx.getBean(JobInstanceLoader.class);
-                jobInstanceLoader.registerTaskJob(taskId);
-            }
-
-            Long reportId = JobInstanceLoader.getReportIdFromJobName(bundle.getJobDetail().getKey().getName());
-            if (reportId != null) {
-                JobInstanceLoader jobInstanceLoader = ctx.getBean(JobInstanceLoader.class);
-                jobInstanceLoader.registerReportJob(reportId);
-            }
-        }
-
         final Object job = ctx.getBean(bundle.getJobDetail().getKey().getName());
         final BeanWrapper wrapper = PropertyAccessorFactory.forBeanPropertyAccess(job);
         if (isEligibleForPropertyPopulation(wrapper.getWrappedInstance())) {


Mime
View raw message