awips2/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml

165 lines
6.7 KiB
XML
Raw Normal View History

2022-05-05 12:34:50 -05:00
<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.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean class="com.raytheon.uf.common.logback.appender.ThreadBasedAppender" factory-method="registerThreadPattern">
<constructor-arg value="smartInit" />
<constructor-arg value="smartInit.*" />
</bean>
<bean id="gfeSiteActivation" class="com.raytheon.edex.plugin.gfe.config.GFESiteActivation"
depends-on="commonTimeRegistered, gfeDbRegistered, levelFactoryInitialized, dataStorageAuditerContainer" />
<bean id="smartInitQueue" class="com.raytheon.edex.plugin.gfe.smartinit.SmartInitQueue" factory-method="createQueue"/>
<bean id="gfeSitesActiveIngest" factory-bean="siteAwareRegistry" factory-method="register"
depends-on="smartInitQueue, gfeActivationAsyncIngest">
<constructor-arg ref="gfeSiteActivation"/>
</bean>
<bean id="gfeActivationAsyncIngest" factory-bean="contextManager" factory-method="registerAsyncStartupBean">
<constructor-arg ref="gfeSiteActivation"/>
</bean>
<bean id="smartInitSrv" class="com.raytheon.edex.plugin.gfe.smartinit.SmartInitSrv" factory-method="createServer" depends-on="gfeDbRegistered, gfeSitesActiveIngest">
<property name="pendingInitMinTimeMillis" value="120000"/>
<property name="runningInitTimeOutMillis" value="600000"/>
<property name="threadSleepInterval" value="30000"/>
<property name="threadCount" value="${smartinit.threads}"/>
</bean>
<bean factory-bean="contextManager" factory-method="registerContextStateProcessor">
<constructor-arg ref="gfe-camel-spring"/>
<constructor-arg ref="smartInitSrv"/>
</bean>
<bean id="spcWatch" class="com.raytheon.edex.plugin.gfe.watch.SPCWatchSrv"/>
<bean id="tpcWatch" class="com.raytheon.edex.plugin.gfe.watch.TPCWatchSrv"/>
<bean id="wclWatch" class="com.raytheon.edex.plugin.gfe.watch.WCLWatchSrv"/>
<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="vm:gfe.spcWatch"/>
<doTry>
<bean ref="spcWatch" method="handleWatch"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:gfeWatch?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="TPCWatch">
<from uri="vm:gfe.tpcWatch"/>
<doTry>
<bean ref="tpcWatch" method="handleWatch"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:gfeWatch?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="WCLWatch">
<from uri="direct-vm:wclWatch"/>
<doTry>
<bean ref="wclWatch" method="handleWclWatch"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:gfeWatch?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="smartInitTrigger">
<from uri="timer://smartInitTimer?fixedRate=true&amp;period=30000"/>
<bean ref="smartInitQueue" method="fireSmartInit"/>
</route>
<route id="gfeIngestNotification">
<!-- Data from plugin notification -->
<from
uri="jms-durable:queue:gfeDataURINotification"/>
<doTry>
<bean ref="serializationUtil" method="transformFromThrift"/>
<bean ref="ifpServer" method="filterDataURINotifications"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:ifpServer?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="ifpServerPurgeNotification">
<from uri="jms-generic:queue:gfePurgeNotification"/>
<doTry>
<bean ref="ifpServer" method="pluginPurged"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:ifpServer?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
<camelContext id="clusteredGfeIngestRoutes" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler">
<!-- Smart Init Routes -->
<!-- main route now handled through the gfeIngestNotification -->
<route id="manualSmartInit">
<from uri="jms-durable:queue:manualSmartInit?threadName=smartInitManual" />
<doTry>
<bean ref="smartInitQueue" method="addManualInit"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:smartinit?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="gfeVtecChangeNotification">
<from uri="jms-generic:topic:edex.alerts.vtec?threadName=gfe-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"/>
</doCatch>
</doTry>
</route>
<!-- Convert the topic into a queue so only one consumer gets each message and we still have competing consumers. -->
<route id="gfePurgeNotificationQueueRoute">
<from uri="jms-generic:topic:pluginPurged"/>
<doTry>
<to uri="jms-generic:queue:gfePurgeNotification"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:ifpServer?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
<bean factory-bean="contextManager" factory-method="registerClusteredContext">
<constructor-arg ref="clusteredGfeIngestRoutes"/>
</bean>
</beans>