Are you talking about an Apache Karaf container?

Then I think its not very easy as the etc folder is osgi config admin
thingy, and that works only for osgi stuff and when using blueprint
with their ${ } placeholders.

Not sure if we can make camel-quartz understand osgi config admin, and
then allow to refer to a pid, eg

  <property name="propertiesFile" value="config-admin:myPidNameHere" />

Where config-admin is a osgi resolver that does that config admin lookup.

Also not sure if we can cause any re-load strategies, eg if you change
the properties file, then that should trigger a reload of the entire
bundle with your camel app. That is something you can do with
blueprint and config admin. Which likely is better for that. So likely
we need that, and then that above to refer to that blueprint thing.



On Tue, May 9, 2017 at 2:10 PM, Kevin-Void <antonykevin....@gmail.com> wrote:
> Hello All,
>
> I want to configure my quartz properties in cfg file or in an individual
> property file in etc directory of the container, so that i can make changes
> easily in that file instead of making change in code and rebuilding the jar
> again.
>
> Please find my code below:
>
> my route:
>
> <route id="allOffersRoute">
>     <from uri="quartz2://t3-newinventory-scheduler?cron={{cron.schedule}}"/>
>     <log message="Got the message"/>
> </route>
>
> <bean id="quartz2"
> class="org.apache.camel.component.quartz2.QuartzComponent">
>                 <property name="propertiesFile" 
> value="org/quartz/quartz.properties" />
>         </bean>
>
> quartz.properties file
>
> # Main Quartz configuration
> org.quartz.scheduler.skipUpdateCheck=true
> org.quartz.scheduler.instanceName=DatabaseClusteredScheduler
> org.quartz.scheduler.instanceId=AUTO
> org.quartz.scheduler.jobFactory.class=org.quartz.simpl.SimpleJobFactory
> org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
> org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
> org.quartz.jobStore.dataSource=quartzDataSource
> org.quartz.jobStore.tablePrefix=QRTZ_
> org.quartz.jobStore.isClustered=true
> org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
> org.quartz.threadPool.threadCount=10
> org.quartz.jobStore.clusterCheckinInterval=20000
>
>
> # JobStore: JDBC jobStoreTX
> org.quartz.dataSource.quartzDataSource.driver=oracle.jdbc.driver.OracleDriver
> org.quartz.dataSource.quartzDataSource.URL=jdbc:oracle:thin:@(DESCRIPTION =
> (ADDRESS_LIST= (ADDRESS = (PROTOCOL = TCP)(HOST = *)(PORT =
> 1521)))(CONNECT_DATA =( SERVICE_NAME = *)))
> org.quartz.dataSource.quartzDataSource.user=esb123
> org.quartz.dataSource.quartzDataSource.password=esb123
> org.quartz.dataSource.quartzDataSource.maxConnections=10
> org.quartz.dataSource.quartzDataSource.validationQuery=select 0 from dual
>
> I just want to configure the quartz.properties file externally so that i
> dont have to change the jar everytime whenever there is a change is quartz
> Database :(
>
> Please help.
>
> Kind Regards,
> Kevin
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Configuring-Quartz-in-cfg-file-Property-placeholder-tp5799160.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to