awips2/edexOsgi/com.raytheon.edex.plugin.modelsounding/res/spring/modelsounding-ingest.xml
Richard Peter fbda83aeb9 Issue #2170: Update Plugin Notification Framework
Change-Id: I2ec99fadbe2f383bb0892c59601350395f1e5277

Former-commit-id: 081a19d5cfca3d717a332357dbaead199767e0b8
2013-12-03 11:41:21 -06:00

80 lines
3.1 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">
<bean id="modelsoundingPersistenceManager"
class="com.raytheon.edex.plugin.modelsounding.ModelSoundingPersistenceManager">
</bean>
<bean id="modelsoundingDecoder"
class="com.raytheon.edex.plugin.modelsounding.ModelSoundingDecoder"
init-method="start"
destroy-method="shutdown">
<property name="modelSoundingPersistenceManager" ref="modelsoundingPersistenceManager" />
</bean>
<!-- Filter down sounding data -->
<!-- bean id="mdlsndgFilter" class="com.raytheon.uf.edex.decodertools.core.filterimpl.PluginDataObjectFilter">
<constructor-arg type="java.lang.String" value="modelSounding_filters.xml" />
</bean -->
<bean id="mdlsndgDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg ref="modelsoundingPluginName" />
<constructor-arg value="jms-dist:queue:Ingest.modelsounding"/>
</bean>
<bean id="modelsoundingCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="modelsounding-camel"/>
</bean>
<camelContext id="modelsounding-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<!--
<endpoint id="modelsndgFileEndpoint"
uri="file:${edex.home}/data/sbn/mdlsndg?noop=true&amp;idempotent=false" />
<route id="modelsndgFileConsumerRoute">
<from ref="modelsndgFileEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>modelsounding</constant>
</setHeader>
<to uri="jms-durable:queue:Ingest.modelsounding" />
</route>
-->
<!-- Begin Model Sounding routes -->
<route id="modelsndgIngestRoute">
<from uri="jms-durable:queue:Ingest.modelsounding"/>
<setHeader headerName="pluginName">
<constant>modelsounding</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<bean ref="modelsoundingDecoder" method="decode"/>
<!-- model sounding decoder has dedicated store thread, only need to forward to log -->
<bean ref="processUtil" method="log"/>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:modelsounding?level=ERROR"/>
</doCatch>
</doTry>
</route>
<!-- Copy of persist route without the log call -->
<route id="modelSoundingPersistIndexAlert">
<from uri="direct-vm:modelSoundingPersistIndexAlert"/>
<bean ref="persist" method="persist"/>
<bean ref="index" method="index"/>
<to uri="direct-vm:stageNotification"/>
</route>
</camelContext>
</beans>