[ 
https://issues.apache.org/jira/browse/CAMEL-7454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14006844#comment-14006844
 ] 

Claus Ibsen commented on CAMEL-7454:
------------------------------------

This is intended as the scheduler name should be unique.

Why do you want different schedulers to have the same name?

> Camel-Quartz2 Scheduler Name Difference
> ---------------------------------------
>
>                 Key: CAMEL-7454
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7454
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-quartz2
>    Affects Versions: 2.13.0
>            Reporter: Dakota Brown
>            Priority: Minor
>              Labels: quartz
>
> We have a situation where we have multiple quartz routes in different camel 
> contexts. We want to have the same scheduler name for these schedulers. 
> In camel-quartz2 version 2.12.2, it works as expected.
> In camel-quartz2 version 2.13.0, each scheduler is appended with the 
> context's name.
> *Files*
> {code:title = quartz.LOCAL.properties|borderStyle=solid}
> #============================================================================
> # Configure Main Scheduler Properties  
> #============================================================================
> org.quartz.scheduler.instanceName = Test2
> org.quartz.scheduler.instanceId = AUTO
> #============================================================================
> # Configure ThreadPool  
> #============================================================================
> org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
> org.quartz.threadPool.threadCount = 25
> org.quartz.threadPool.threadPriority = 5
> #============================================================================
> # Configure JobStore  
> #============================================================================
> org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
> org.quartz.jobStore.driverDelegateClass = 
> org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
> org.quartz.jobStore.useProperties = true
> org.quartz.jobStore.dataSource = myDS
> org.quartz.jobStore.tablePrefix = QRTZ_
> org.quartz.jobStore.isClustered = true
> org.quartz.jobStore.clusterCheckinInterval = 20000
> org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriver
> org.quartz.dataSource.myDS.URL = jdbc:oracle:thin:@XXXXXXX
> org.quartz.dataSource.myDS.user = XXXXX
> org.quartz.dataSource.myDS.password = XXXXXXXX
> org.quartz.dataSource.myDS.maxConnections = 5
> org.quartz.dataSource.myDS.validationQuery=select 0 from dual
> #============================================================================
> # Configure Trigger Logging  
> #============================================================================
> org.quartz.plugin.triggHistory.class = 
> org.quartz.plugins.history.LoggingTriggerHistoryPlugin
> org.quartz.plugin.triggHistory.triggerFiredMessage = Trigger \{1\}.\{0\} 
> fired job \{6\}.\{5\} at: \{4, date, HH:mm:ss MM/dd/yyyy}
> org.quartz.plugin.triggHistory.triggerCompleteMessage = Trigger \{1\}.\{0\} 
> completed firing job \{6\}.\{5\} at \{4, date, HH:mm:ss MM/dd/yyyy\}.
> {code}
> {code:title = TestContext1.xml|borderStyle=solid}
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans";
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xmlns:camel="http://camel.apache.org/schema/spring";
>       xmlns:context="http://www.springframework.org/schema/context";
>       xmlns:util="http://www.springframework.org/schema/util";
>       xsi:schemaLocation="
>        http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://www.springframework.org/schema/context 
> http://www.springframework.org/schema/context/spring-context-3.0.xsd
>        http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd
>        http://www.springframework.org/schema/util  
> http://www.springframework.org/schema/util/spring-util.xsd";>
>        <bean id="quartz1" 
> class="org.apache.camel.component.quartz2.QuartzComponent">
>               <property name="propertiesFile" 
> value="config/quartz/quartz.LOCAL.properties" />
>       </bean>
>       <camelContext id="TestContext1" 
> xmlns="http://camel.apache.org/schema/spring";
>               xmlns:oas="http://www.verizonwireless.com/oas";>
>               <route id="route1">
>                       <from 
> uri="quartz1://RSSX/test1?pauseJob=false&amp;deleteJob=false&amp;stateful=true&amp;cron=30+*+*+*+*+?"
>  />
>                       <log message="${header.scheduler} fired route 1"/>      
>         
>               </route>
>               
>       </camelContext>
>       
> </beans>
> {code}
> *Results*
> Running camel-quartz2 version 2.12.2:
> {code:xml}
> Quartz scheduler 'Test2' initialized from an externally provided properties 
> instance.
> {code}
> Running camel-quartz2 version 2.13.0:
> {code:xml}
> Quartz scheduler 'Test2-TestContext1' initialized from an externally provided 
> properties instance.
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to