awips2/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml
root 8e80217e59 Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: a02aeb236c [formerly 9f19e3f712] [formerly 06a8b51d6d [formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]
Former-commit-id: 06a8b51d6d
Former-commit-id: 3360eb6c5f
2012-01-06 08:55:05 -06:00

125 lines
5.5 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>
<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>
</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="smartInitTrigger">
<from uri="timer://smartInitTimer?fixedRate=true&amp;period=30000" />
<bean ref="smartInitQueue" method="fireSmartInit" />
</route>
<!-- Other Routes -->
<route id="gfeGribIngestNotification">
<from uri="jms-generic:queue:gribNotification?destinationResolver=#qpidDurableResolver" />
<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>
<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>
</camelContext>
<bean factory-bean="clusteredCamelContextMgr"
factory-method="register">
<constructor-arg ref="clusteredGfeIngestRoutes" />
</bean>
</beans>