camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Fixed camel-quartz to initalize properly in doStart instead of lazy init in getters which is wrong
Date Mon, 01 Dec 2014 09:10:37 GMT
Repository: camel
Updated Branches:
  refs/heads/master 495bc2b51 -> 4e1b96052


Fixed camel-quartz to initalize properly in doStart instead of lazy init in getters which
is wrong


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4e1b9605
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4e1b9605
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4e1b9605

Branch: refs/heads/master
Commit: 4e1b96052f657f23137760c2724b999cf8e04051
Parents: 495bc2b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Dec 1 10:10:28 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Dec 1 10:10:28 2014 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/quartz/QuartzEndpoint.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4e1b9605/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
index 43fcb7e..111f257 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
@@ -188,9 +188,6 @@ public class QuartzEndpoint extends DefaultEndpoint implements ShutdownableServi
     }
 
     public LoadBalancer getLoadBalancer() {
-        if (loadBalancer == null) {
-            loadBalancer = createLoadBalancer();
-        }
         return loadBalancer;
     }
 
@@ -295,6 +292,11 @@ public class QuartzEndpoint extends DefaultEndpoint implements ShutdownableServi
     @Override
     protected void doStart() throws Exception {
         ObjectHelper.notNull(getComponent(), "QuartzComponent", this);
+
+        if (loadBalancer == null) {
+            loadBalancer = createLoadBalancer();
+        }
+
         ServiceHelper.startService(loadBalancer);
 
         if (isDeleteJob() && isPauseJob()) {


Mime
View raw message