awips2/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml
Steve Harris 98059f9ef1 12.9.1-5 baseline
Former-commit-id: 77cbd6c1e5 [formerly a1d931fd44] [formerly 61f269f54c] [formerly 77cbd6c1e5 [formerly a1d931fd44] [formerly 61f269f54c] [formerly f2fac39428 [formerly 61f269f54c [formerly d85b989f77196d20eb2d2a21cf4daa13d50474ae]]]]
Former-commit-id: f2fac39428
Former-commit-id: d9faed979f [formerly 7fb0b17bd5] [formerly 54140b7733222bbc423315196e9781453b12f896 [formerly 72824561cb]]
Former-commit-id: 84e9e52a92ae5e740b0daf680a98316f7435f7f7 [formerly 9b5c2094ed]
Former-commit-id: 2d928d328e
2012-08-21 15:27:03 -05:00

137 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="${smartinit.threadpoolsize}" />
<property name="maxPoolSize" value="${smartinit.threadpoolsize}" />
</bean>
<bean id="smartInitSrvCfg" class="com.raytheon.edex.plugin.gfe.smartinit.SmartInitSrvConfig">
<property name="executor" ref="smartInitThreadPool"/>
<property name="threads" value="${smartinit.threads}"/>
<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>