awips2/edexOsgi/com.raytheon.uf.edex.site/res/spring/site-common.xml

46 lines
1.9 KiB
XML
Raw Normal View History

<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-2.0.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="siteActivateNotifyFilter"
class="com.raytheon.uf.edex.site.notify.SiteActivateNotifyFilter" />
<bean id="siteActivationMonitor" class="com.raytheon.uf.edex.site.SiteActivationMonitor" factory-method="getInstance"/>
<camelContext id="siteActivation"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<route id="siteActivationRoute">
<from uri="jms-generic:topic:siteActivation" />
<doTry>
<bean ref="serializationUtil" method="transformFromThrift"/>
<bean ref="siteAwareRegistry" method="handleMessage" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:siteActivation?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
<route id="siteActivateNotify">
<from uri="vm:edex.siteActivateNotification?size=5000" />
<filter>
<method bean="siteActivateNotifyFilter" method="isSiteActivateNotification" />
<bean ref="siteActivationMonitor" method="handleNotification"/>
<bean ref="serializationUtil" method="transformToThrift" />
<to uri="jms-generic:topic:edex.alerts.siteActivate?timeToLive=60000" />
</filter>
</route>
</camelContext>
<bean id="siteActivationRegistered" factory-bean="contextManager"
factory-method="register">
<constructor-arg ref="siteActivation"/>
</bean>
<bean id="siteAwareRegistry" class="com.raytheon.uf.edex.site.SiteAwareRegistry" factory-method="getInstance">
<property name="routeId" value="siteActivationRoute"/>
</bean>
</beans>