awips2/edexOsgi/com.raytheon.edex.plugin.warning/res/spring/warning-request.xml
Richard Peter 5350b3eac8 Issue #2726: Edex graceful shutdown.
Refactored to use inheritance and separate logic where possible.
             Addressed comments.

Change-Id: I9e62414cd83121575bdf99a3b47466a7585bedb6

Former-commit-id: 909571ebca [formerly e4be1f24e7] [formerly dbba727f3d] [formerly 909571ebca [formerly e4be1f24e7] [formerly dbba727f3d] [formerly 17196b5dcd [formerly dbba727f3d [formerly 6e015b3f61c20635077d6e8271e9b763e5a32fe1]]]]
Former-commit-id: 17196b5dcd
Former-commit-id: b5fa843960 [formerly ff87317bd4] [formerly f202d7fc11f48792bac7d10cbb20d9ba9077aa8f [formerly 8b279966d1]]
Former-commit-id: b1349363c5b25965107de3827211c7bcc6b9e98b [formerly b3fd8e5480]
Former-commit-id: de624d87d3
2014-04-14 13:10:11 -05:00

51 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="geospatialDataGenerator" class="com.raytheon.edex.plugin.warning.gis.GeospatialDataGenerator">
<constructor-arg value="geospatialUpdateNotify"/>
</bean>
<bean id="generateGeospatialDataRequestHandler" class="com.raytheon.edex.plugin.warning.gis.GenerateGeospatialDataRequestHandler">
<constructor-arg ref="geospatialDataGenerator"/>
</bean>
<bean factory-bean="handlerRegistry" factory-method="register">
<constructor-arg value="com.raytheon.uf.common.dataplugin.warning.gis.GenerateGeospatialDataRequest"/>
<constructor-arg ref="generateGeospatialDataRequestHandler"/>
</bean>
<camelContext id="geospatialDataGenerator-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<endpoint id="geospatialDataUpdaterCron"
uri="clusteredquartz://warning/checkGeospatialData/?cron=${geospatial.updater.cron}" />
<!-- Generate once on context start -->
<route id="geospatialDataGeneratorRoute">
<from uri="timer://generateWarngenGeometries?repeatCount=1"/>
<bean ref="geospatialDataGenerator" method="generateUniqueGeospatialMetadataGeometries"/>
</route>
<!-- check generate periodically -->
<route id="geospatialDataUpdaterRoute">
<from ref="geospatialDataUpdaterCron"/>
<doTry>
<bean ref="geospatialDataGenerator" method="generateUniqueGeospatialMetadataGeometries"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:geospatialDataUpdater?level=ERROR" />
</doCatch>
</doTry>
</route>
<!-- Route to send geospatial data update notification -->
<route id="geospatialUpdateNotify">
<from uri="vm:edex.geospatialUpdateNotification" />
<bean ref="serializationUtil" method="transformToThrift" />
<to uri="jms-generic:topic:edex.geospatialUpdate.msg" />
</route>
</camelContext>
</beans>