[
https://issues.apache.org/jira/browse/CAMEL-10606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15751773#comment-15751773
]
ASF GitHub Bot commented on CAMEL-10606:
----------------------------------------
GitHub user jamesnetherton opened a pull request:
https://github.com/apache/camel/pull/1350
CAMEL-10606: Change quartz2 endpoint to be a singleton
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jamesnetherton/camel CAMEL-10606
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1350.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1350
----
commit 6cea29e0b46e5e4d0b329ee62465cea431cacfca
Author: James Netherton <[email protected]>
Date: 2016-12-15T16:15:50Z
CAMEL-10606: Change quartz2 endpoint to be a singleton
----
> Modify quartz2 endpoint to be a singleton
> -----------------------------------------
>
> Key: CAMEL-10606
> URL: https://issues.apache.org/jira/browse/CAMEL-10606
> Project: Camel
> Issue Type: Improvement
> Components: camel-quartz2
> Reporter: James Netherton
> Assignee: James Netherton
>
> Currently the quartz2 endpoint implements isSingleton() and returns false.
> This causes issues if you try to do something like:
> {code}
> camelContext.getEndpoint("quartz2://foo?cron=5+*+*+*+*")
> {code}
> Which can trigger the endpoint start() method to be called and results in:
> {code}
> Caused by: java.lang.IllegalArgumentException: Trigger key
> myGroup.longPeriodTimer is already in use by
> quartz2://foo/longPeriodTimer?cron=5+*+*+*+*
> at
> org.apache.camel.component.quartz2.QuartzEndpoint.ensureNoDupTriggerKey(QuartzEndpoint.java:446)
> at
> org.apache.camel.component.quartz2.QuartzEndpoint.addJobInScheduler(QuartzEndpoint.java:380)
> at
> org.apache.camel.component.quartz2.QuartzEndpoint.doStart(QuartzEndpoint.java:340)
> {code}
> The quartz1 endpoint implements isSingleton to return true. I see no reason
> why quartz2 should be any different.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)