You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/05/22 08:50:58 UTC
[camel] branch master updated (df4ea56 -> d387881)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from df4ea56 Upgrade Async http client to version 2.9.0
new 14b3ab5 CAMEL-13476: QuartzScheduledPollConsumerScheduler should not remove trigger when quartz is clustered
new 65e2c9a CAMEL-13555: Producer and consumer template/cache should check if camel is started when being used
new d387881 CAMEL-13476: QuartzScheduledPollConsumerScheduler should not remove trigger when quartz is clustered
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../quartz2/QuartzScheduledPollConsumerScheduler.java | 18 +++++++++++++++---
.../RouteAutoStopFalseCronScheduledPolicyTest.java | 6 ------
2 files changed, 15 insertions(+), 9 deletions(-)
[camel] 03/03: CAMEL-13476: QuartzScheduledPollConsumerScheduler
should not remove trigger when quartz is clustered
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d3878813e5d2dd490a044766ed8bc539157a30c9
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed May 22 10:50:29 2019 +0200
CAMEL-13476: QuartzScheduledPollConsumerScheduler should not remove trigger when quartz is clustered
---
.../camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java b/components/camel-quartz2/src/main/java/org/apache/camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java
index 9e21fbc..2ff32ec 100644
--- a/components/camel-quartz2/src/main/java/org/apache/camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java
+++ b/components/camel-quartz2/src/main/java/org/apache/camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java
@@ -27,7 +27,6 @@ import org.apache.camel.component.quartz2.QuartzComponent;
import org.apache.camel.component.quartz2.QuartzConstants;
import org.apache.camel.component.quartz2.QuartzHelper;
import org.apache.camel.spi.ScheduledPollConsumerScheduler;
-import org.apache.camel.spi.UriParam;
import org.apache.camel.support.service.ServiceSupport;
import org.apache.camel.util.StringHelper;
import org.quartz.CronScheduleBuilder;
[camel] 02/03: CAMEL-13555: Producer and consumer template/cache
should check if camel is started when being used
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 65e2c9a3053fdda9a6baf7ff6b66b4ca93214411
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed May 22 10:44:40 2019 +0200
CAMEL-13555: Producer and consumer template/cache should check if camel is started when being used
---
.../quartz2/RouteAutoStopFalseCronScheduledPolicyTest.java | 6 ------
1 file changed, 6 deletions(-)
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/RouteAutoStopFalseCronScheduledPolicyTest.java b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/RouteAutoStopFalseCronScheduledPolicyTest.java
index 938152b..458c4b4 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/RouteAutoStopFalseCronScheduledPolicyTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/RouteAutoStopFalseCronScheduledPolicyTest.java
@@ -26,11 +26,6 @@ import org.junit.Test;
*/
public class RouteAutoStopFalseCronScheduledPolicyTest extends CamelTestSupport {
- @Override
- public boolean isUseRouteBuilder() {
- return false;
- }
-
@Test
public void testCronPolicy() throws Exception {
// send a message on the seda queue so we have a message to start with
@@ -48,7 +43,6 @@ public class RouteAutoStopFalseCronScheduledPolicyTest extends CamelTestSupport
.to("mock:foo");
}
});
- context.start();
assertMockEndpointsSatisfied();
}
[camel] 01/03: CAMEL-13476: QuartzScheduledPollConsumerScheduler
should not remove trigger when quartz is clustered
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 14b3ab54afa951f8ed4ac8aa38cba83aae167bf3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed May 22 10:43:36 2019 +0200
CAMEL-13476: QuartzScheduledPollConsumerScheduler should not remove trigger when quartz is clustered
---
.../quartz2/QuartzScheduledPollConsumerScheduler.java | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java b/components/camel-quartz2/src/main/java/org/apache/camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java
index add7a9e..9e21fbc 100644
--- a/components/camel-quartz2/src/main/java/org/apache/camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java
+++ b/components/camel-quartz2/src/main/java/org/apache/camel/pollconsumer/quartz2/QuartzScheduledPollConsumerScheduler.java
@@ -27,6 +27,7 @@ import org.apache.camel.component.quartz2.QuartzComponent;
import org.apache.camel.component.quartz2.QuartzConstants;
import org.apache.camel.component.quartz2.QuartzHelper;
import org.apache.camel.spi.ScheduledPollConsumerScheduler;
+import org.apache.camel.spi.UriParam;
import org.apache.camel.support.service.ServiceSupport;
import org.apache.camel.util.StringHelper;
import org.quartz.CronScheduleBuilder;
@@ -57,6 +58,7 @@ public class QuartzScheduledPollConsumerScheduler extends ServiceSupport impleme
private String triggerId;
private String triggerGroup = "QuartzScheduledPollConsumerScheduler";
private TimeZone timeZone = TimeZone.getDefault();
+ private boolean deleteJob = true;
private volatile CronTrigger trigger;
private volatile JobDetail job;
@@ -153,6 +155,14 @@ public class QuartzScheduledPollConsumerScheduler extends ServiceSupport impleme
this.triggerGroup = triggerGroup;
}
+ public boolean isDeleteJob() {
+ return deleteJob;
+ }
+
+ public void setDeleteJob(boolean deleteJob) {
+ this.deleteJob = deleteJob;
+ }
+
@Override
protected void doStart() throws Exception {
StringHelper.notEmpty(cron, "cron", this);
@@ -250,9 +260,12 @@ public class QuartzScheduledPollConsumerScheduler extends ServiceSupport impleme
@Override
protected void doStop() throws Exception {
- if (trigger != null) {
- log.debug("Unscheduling trigger: {}", trigger.getKey());
- quartzScheduler.unscheduleJob(trigger.getKey());
+ if (trigger != null && deleteJob) {
+ boolean isClustered = quartzScheduler.getMetaData().isJobStoreClustered();
+ if (!quartzScheduler.isShutdown() && !isClustered) {
+ log.info("Deleting job {}", trigger.getKey());
+ quartzScheduler.unscheduleJob(trigger.getKey());
+ }
}
}