awips2/ncep/gov.noaa.nws.ncep.edex.plugin.ssha/res/spring/ssha-ingest.xml
Nate Jensen c1ca48ab19 Issue #181 integrating ncep edex code
Change-Id: I7f3fd64d1e21d5a82b29b404bb90a62bfa6f79bf

Former-commit-id: adb8188f98 [formerly 873469f771] [formerly f96e6a822b] [formerly a015cc136b [formerly f96e6a822b [formerly 71d87e07ef1d5ce2509fddce9170870a5950ba7b]]]
Former-commit-id: a015cc136b
Former-commit-id: bf42c95476b1354c34e606131e248046867b8dff [formerly e951995736]
Former-commit-id: ba529c4a12
2012-01-24 09:49:27 -06:00

67 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="sshaDecoder"
class="gov.noaa.nws.ncep.edex.plugin.ssha.decoder.SshaDecoder">
<constructor-arg ref="sshaPluginName" />
</bean>
<bean id="sshaSeparator"
class="gov.noaa.nws.ncep.edex.plugin.ssha.decoder.SshaSeparator" />
<bean id="sshaToPointData" class="gov.noaa.nws.ncep.common.dataplugin.ssha.dao.SshaPointDataTransform" />
<bean id="sshaDistRegistry" factory-bean="distributionSrv"
factory-method="register">
<constructor-arg ref="sshaPluginName" />
<constructor-arg value="jms-dist:queue:Ingest.ssha" />
</bean>
<bean id="sshaCamelRegistered" factory-bean="contextManager"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="ssha-camel"/>
</bean>
<camelContext id="ssha-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="sshaFileEndpoint" uri="file:${edex.home}/data/sbn/ssha?noop=true&amp;idempotent=false" />
<!-- Begin Ssha routes -->
<route id="sshaFileConsumerRoute">
<from ref="sshaFileEndpoint" />
<bean ref="fileToString" />
<setHeader headerName="pluginName">
<constant>ssha</constant>
</setHeader>
<to uri="jms-generic:queue:Ingest.ssha" />
</route>
<route id="sshaIngestRoute">
<from uri="jms-generic:queue:Ingest.ssha?destinationResolver=#qpidDurableResolver" />
<setHeader headerName="pluginName">
<constant>ssha</constant>
</setHeader>
<doTry>
<pipeline>
<bean ref="stringToFile" />
<bean ref="sshaDecoder" method="decode" />
<bean ref="sshaToPointData" method="toPointData" />
<to uri="directvm:persistIndexAlert" />
</pipeline>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:ssha?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>