awips2/edexOsgi/com.raytheon.uf.edex.ohd/res/spring/dqcPreprocessor-spring.xml
2022-05-05 12:34:50 -05:00

38 lines
1.4 KiB
XML

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="dqcPreprocService" class="com.raytheon.uf.edex.ohd.pproc.DqcPreProcSrv" />
<bean id="dqcPreProcScheduledExecutionManager"
class="com.raytheon.uf.edex.ohd.pproc.DqcPreProcScheduledExecutionManager" />
<camelContext id="dqcPreproc-context" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<endpoint id="dqcPreprocCron"
uri="clusteredquartz://pproc/dqcPreprocScheduled/?cron=${dqcpreprocessor.cron}" />
<!-- Run dqcPreproc on Scheduled timer -->
<route id="dqcPreprocScheduled">
<from uri="dqcPreprocCron" />
<doTry>
<bean ref="dqcPreProcScheduledExecutionManager" method="isEnabled" />
<filter>
<simple>${body} == false</simple>
<stop />
</filter>
<bean ref="dqcPreprocService" method="getDefaultConfiguration" />
<bean ref="dqcPreprocService" method="runDQCPreproc" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:dqcPreprocessor?level=ERROR" />
</doCatch>
</doTry>
</route>
</camelContext>
</beans>