awips2/edexOsgi/com.raytheon.uf.edex.plugin.text.subscription/res/spring/text-subscription-common.xml

42 lines
1.8 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-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<!-- 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="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>