awips2/ncep/gov.noaa.nws.ncep.edex.plugin.tcm/res/spring/tcm-ingest.xml
root 06a8b51d6d Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 64fa9254b946eae7e61bbc3f513b7c3696c4f54f
2012-01-06 08:55:05 -06:00

70 lines
No EOL
2.4 KiB
XML

<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
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://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="tcmDecoder" class="gov.noaa.nws.ncep.edex.plugin.tcm.decoder.TcmDecoder">
<constructor-arg ref="tcmPluginName" />
</bean>
<bean id="tcmSeparator" class="gov.noaa.nws.ncep.edex.plugin.tcm.decoder.TcmSeparator" />
<bean id="tcmDistRegistry" factory-bean="distributionSrv"
factory-method="register" >
<constructor-arg value="tcm" />
<constructor-arg value="jms-dist:queue:Ingest.tcm" />
</bean>
<bean id="tcmCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="tcm-camel"/>
</bean>
<camelContext id="tcm-camel" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="tcmFileEndpoint" uri="file:${edex.home}/data/sbn/tcm?noop=true&amp;idempotent=false" />
<!-- Begin Tcm routes -->
<route id="tcmFileConsumerRoute">
<from ref="tcmFileEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>tcm</constant>
</setHeader>
<to uri="jms-generic:queue:Ingest.tcm" />
</route>
<route id="tcmIngestRoute">
<from uri="jms-generic:queue:Ingest.tcm" />
<setHeader headerName="pluginName">
<constant>tcm</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<split streaming="true">
<method bean="tcmSeparator" method="separate" />
<doTry>
<pipeline>
<bean ref="tcmDecoder" method="decode" />
<to uri="directvm:indexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:tcm?level=ERROR&amp;showBody=false" />
</doCatch>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:tcm?level=ERROR&amp;showBody=false"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>