awips2/edexOsgi/com.raytheon.uf.edex.plugin.text.subscription/res/spring/text-subscription-common.xml
2022-05-05 12:34:50 -05:00

59 lines
No EOL
2.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="autoFaxDao" class="com.raytheon.uf.edex.plugin.text.subscription.fax.AutoFaxDao">
<property name="autoFaxNotifyURI" value="jms-generic:topic:autofax.notify"/>
</bean>
<!-- define the bean that handles watch/warn script handling -->
<bean id="textScriptRunner" class="com.raytheon.uf.edex.plugin.text.subscription.services.ScriptRunner">
<property name="type" value="ldad" />
</bean>
<bean id="subscriptionDao" class="com.raytheon.uf.edex.plugin.text.subscription.dao.SubscriptionDAO">
<property name="subscriptionNotifyURI" value="jms-generic:topic:subscription.notify"/>
</bean>
<camelContext id="common-subscription-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<!-- Watch/Warn triggered script runner, internal use only -->
<route id="watchWarnDirect">
<from uri="direct-vm:watchWarnDirect"/>
<doTry>
<bean ref="textScriptRunner" method="runScripts" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:subscription?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="autoFaxNotify">
<from uri="jms-generic:topic:autofax.notify"/>
<doTry>
<bean ref="autoFaxDao" method="updateCache" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:autoFax?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="subscriptionNotify">
<from uri="jms-generic:topic:subscription.notify"/>
<doTry>
<bean ref="subscriptionDao" method="updateCache" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:subscription?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>