awips2/ncep/gov.noaa.nws.ncep.edex.plugin.aww/res/spring/aww-ingest.xml
Steve Harris 94f24e0d8a 14.1.1-3 baseline
Former-commit-id: cbfd1a2e3f6b0688eb8e95ef0eaec1450b4bfc03
2013-10-28 10:46:02 -04:00

82 lines
No EOL
3.3 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="awwDecoder" class="gov.noaa.nws.ncep.edex.plugin.aww.decoder.AwwDecoder">
<constructor-arg ref="awwPluginName"/>
</bean>
<bean id="awwSeparator" class="gov.noaa.nws.ncep.edex.plugin.aww.decoder.AwwSeparator"/>
<!-- bean id="awwRegistry" class=" com.raytheon.uf.edex.esb.camel.BasicThreadPoolRouter"
factory-method="getInstance" depends-on="alphaNumericDatatypePool">
<constructor-arg><value>AlphaNumeric</value></constructor-arg>
<constructor-arg><value>aww</value></constructor-arg>
<constructor-arg><value>direct-vm:awwIngest</value></constructor-arg>
</bean-->
<bean id="awwDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg value="aww" />
<constructor-arg value="jms-dist:queue:Ingest.aww" />
</bean>
<!-- bean id="awwDistRegistry" class="com.raytheon.uf.edex.distribution.DistributionSrv"
factory-method="register">
<constructor-arg value="aww" />
<constructor-arg value="jms-generic:queue:Ingest.AlphaNumeric" />
</bean-->
<bean id="awwCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="aww-camel"/>
</bean>
<camelContext id="aww-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="awwFileEndpoint" uri="file:${edex.home}/data/sbn/aww?noop=true&amp;idempotent=false"/>
<!-- Begin Aww routes -->
<route id="awwFileConsumerRoute">
<from ref="awwFileEndpoint"/>
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>aww</constant>
</setHeader>
<to uri="jms-generic:queue:Ingest.aww"/>
</route>
<route id="awwIngestRoute">
<from uri="jms-generic:queue:Ingest.aww"/>
<setHeader headerName="pluginName">
<constant>aww</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<split streaming="true">
<method bean="awwSeparator" method="separate"/>
<doTry>
<pipeline>
<bean ref="awwDecoder" method="decode"/>
<to uri="direct-vm:indexAlert"/>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:aww?level=ERROR"/>
</doCatch>
</doTry>
</split>
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:aww?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>