awips2/ncep/gov.noaa.nws.ncep.edex.plugin.airep/res/spring/airep-ingest.xml
Richard Peter dbba727f3d Issue #2726: Edex graceful shutdown.
Refactored to use inheritance and separate logic where possible.
             Addressed comments.

Change-Id: I9e62414cd83121575bdf99a3b47466a7585bedb6

Former-commit-id: 6e015b3f61c20635077d6e8271e9b763e5a32fe1
2014-04-14 13:10:11 -05:00

71 lines
2.4 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="airepDecoder" class="gov.noaa.nws.ncep.edex.plugin.airep.AirepDecoder">
<constructor-arg ref="airepPluginName" />
</bean>
<bean id="airepPointData" class="gov.noaa.nws.ncep.common.dataplugin.airep.AirepPointDataTransform"/>
<bean id="airepSeparator" class="gov.noaa.nws.ncep.edex.plugin.airep.AirepSeparator" />
<bean id="airepDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="airep" />
<constructor-arg value="jms-durable:queue:Ingest.airep" />
</bean>
<camelContext id="airep-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<!--
<endpoint id="airepFileEndpoint" uri="file:${edex.home}/data/sbn/airep?noop=true&amp;idempotent=false" />
<route id="airepFileConsumerRoute">
<from ref="airepFileEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>airep</constant>
</setHeader>
<to uri="jms-generic:queue:Ingest.airep" />
</route>
-->
<!-- Begin airep routes -->
<route id="airepIngestRoute">
<from uri="jms-durable:queue:Ingest.airep" />
<setHeader headerName="pluginName">
<constant>airep</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<split streaming="true">
<method bean="airepSeparator" method="separate" />
<doTry>
<pipeline>
<bean ref="airepDecoder" method="decode" />
<!-- Add next line for h5 version and change next
line from indexAlert to persistIndexAlert" /-->
<bean ref="airepPointData" method="toPointData" />
<!-- to uri="direct-vm:indexAlert" /-->
<to uri="direct-vm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:airep?level=ERROR" />
</doCatch>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:airep?level=ERROR" />
</doCatch>
</doTry>
</route>
</camelContext>
</beans>