awips2/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml
David Gillingham 54fa9ad78e Issue #826: Fix TCG and Warning decoders to properly respect ALLOW_ARCHIVE_DATA env variable, fix broken GFE
VTEC notification route.

Change-Id: I48550b9023cc7f251462f0c6620cff352f4512be

Former-commit-id: fceb86f7be [formerly 151515b52d] [formerly 1df1bbbf9e [formerly 151a2069e3bf46f08bc636cf1bd4974b07e65da3]]
Former-commit-id: 1df1bbbf9e
Former-commit-id: 617400bc30
2012-06-29 10:25:09 -05:00

139 lines
6.3 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="smartInitQueue" class="com.raytheon.edex.plugin.gfe.smartinit.SmartInitQueue"/>
<bean id="jms-smartinit" class="org.apache.camel.component.jms.JmsComponent">
<constructor-arg ref="jmsSmartInitConfig" />
<property name="taskExecutor" ref="smartInitThreadPool" />
</bean>
<bean id="jmsSmartInitConfig" class="org.apache.camel.component.jms.JmsConfiguration"
factory-bean="jmsConfig" factory-method="copy" />
<bean id="smartInitThreadPool"
class="com.raytheon.uf.edex.esb.camel.spring.JmsThreadPoolTaskExecutor">
<property name="corePoolSize" value="3" />
<property name="maxPoolSize" value="3" />
</bean>
<bean id="smartInitSrvCfg" class="com.raytheon.edex.plugin.gfe.smartinit.SmartInitSrvConfig">
<property name="executor" ref="smartInitThreadPool"/>
<!-- Threads should be 2 less than the size of the pool to account for reading
from the notify topic and the manual queue -->
<property name="threads" value="1"/>
<property name="pendingInitMinTimeMillis" value="180000"/>
<property name="runningInitTimeOutMillis" value="300000"/>
<property name="threadSleepInterval" value="60000"/>
<property name="initialDelay" value="320000"/>
</bean>
<bean depends-on="gfeDbRegistered" id="smartInitSrv" class="com.raytheon.edex.plugin.gfe.smartinit.SmartInitSrv">
<constructor-arg ref="smartInitSrvCfg" />
</bean>
<bean id="spcWatch" class="com.raytheon.edex.plugin.gfe.spc.SPCWatchSrv" />
<bean id="tpcWatch" class="com.raytheon.edex.plugin.gfe.tpc.TPCWatchSrv" />
<bean id="wclWatch" class="com.raytheon.edex.plugin.gfe.wcl.WCLWatchSrv" />
<bean id="gfeIngestFilter" class="com.raytheon.edex.plugin.gfe.server.notify.GfeIngestNotificationFilter">
<property name="smartInitQueue" ref="smartInitQueue"/>
</bean>
<bean id="vtecChangeListener" class="com.raytheon.edex.plugin.gfe.server.notify.VTECTableChangeListener"/>
<camelContext id="gfe-camel-spring"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<route id="SPCWatch">
<from uri="jms-generic:queue:edex.spcWatch?destinationResolver=#qpidDurableResolver" />
<doTry>
<bean ref="spcWatch" method="handleSpcWatch" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:gfeWatch?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
<route id="TPCWatch">
<from uri="jms-generic:queue:edex.tpcWatch?destinationResolver=#qpidDurableResolver" />
<doTry>
<bean ref="tpcWatch" method="handleTpcWatch" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:gfeWatch?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
<route id="WCLWatch">
<from uri="directvm:wclWatch" />
<bean ref="wclWatch" method="handleWclWatch" />
</route>
<route id="smartInitTrigger">
<from uri="timer://smartInitTimer?fixedRate=true&amp;period=30000" />
<bean ref="smartInitQueue" method="fireSmartInit" />
</route>
<!-- gribNotification not clustered and has two threads to read due to throughput of messages during model run times -->
<route id="gfeGribIngestNotification">
<from uri="jms-generic:queue:gribNotification?destinationResolver=#qpidDurableResolver&amp;concurrentConsumers=2" />
<doTry>
<bean ref="serializationUtil" method="transformFromThrift" />
<bean ref="gfeIngestFilter" method="filterGribNotifications" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:gfeIngestFilter?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
<camelContext id="clusteredGfeIngestRoutes"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler" autoStartup="false">
<!-- Smart Init Routes -->
<!-- main route now handled through the gfeIngestNotification -->
<route id="manualSmartInit">
<from uri="jms-smartinit:queue:manualSmartInit" />
<doTry>
<bean ref="smartInitQueue" method="addManualInit" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:smartinit?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
<route id="gfeSatIngestNotification">
<from uri="jms-generic:queue:satNotification?destinationResolver=#qpidDurableResolver" />
<doTry>
<bean ref="serializationUtil" method="transformFromThrift" />
<bean ref="gfeIngestFilter" method="filterSatelliteNotifications" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:gfeIngestFilter?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
<route id="gfeVtecChangeNotification">
<from uri="jms-generic:topic:edex.alerts.vtec"/>
<doTry>
<bean ref="serializationUtil" method="transformFromThrift" />
<bean ref="vtecChangeListener" method="handleNotification" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:vtecChangeListener?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
<bean factory-bean="clusteredCamelContextMgr"
factory-method="register">
<constructor-arg ref="clusteredGfeIngestRoutes" />
</bean>
</beans>