awips2/edexOsgi/com.raytheon.uf.edex.tafqueue/res/spring/tafqueue-request.xml

60 lines
2.4 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-3.1.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="TafQueueRequestHandler"
class="com.raytheon.uf.edex.tafqueue.TafQueueRequestHandler" />
<bean id="TafQueueManager"
class="com.raytheon.uf.edex.tafqueue.TafQueueManager" factory-method="getInstance">
<property name="destinationUri" value="jms-generic:topic:tafQueueChanged"/>
</bean>
<bean id="tafQueueProperties" class="com.raytheon.uf.edex.database.DatabasePluginProperties">
<property name="pluginFQN" value="com.raytheon.uf.common.tafqueue" />
<property name="database" value="metadata" />
</bean>
<bean id="tafqueueHandlerRegistered" factory-bean="handlerRegistry" factory-method="register">
<constructor-arg
value="com.raytheon.uf.common.tafqueue.TafQueueRequest" />
<constructor-arg ref="TafQueueRequestHandler" />
</bean>
<bean id="tafqueueRegistered" factory-bean="dbPluginRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.tafqueue"/>
<constructor-arg ref="tafQueueProperties"/>
</bean>
<!-- TAF Send Routes -->
<camelContext id="clusteredTafQueueRoutes"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<route id="tafQueueSendJobAggr">
<from uri="quartz://tafQueueQuartz?trigger.repeatInterval=1"/>
<doTry>
<bean ref="TafQueueManager" method="startManager" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:tafSendQueue?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="tafQueueChangedJob">
<from uri="jms-generic:topic:tafQueueChanged"/>
<doTry>
<bean ref="TafQueueManager" method="queueChanged" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:tafSendQueue?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
<bean factory-bean="contextManager" factory-method="registerClusteredContext">
<constructor-arg ref="clusteredTafQueueRoutes" />
</bean>
</beans>