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

Change-Id: I9e62414cd83121575bdf99a3b47466a7585bedb6

Former-commit-id: 6e015b3f61c20635077d6e8271e9b763e5a32fe1
2014-04-14 13:10:11 -05:00

66 lines
3.3 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="gfeProperties" class="com.raytheon.uf.common.dataplugin.PluginProperties">
<property name="pluginName" value="gfe"/>
<property name="pluginFQN" value="com.raytheon.uf.common.dataplugin.gfe"/>
<property name="dao" value="com.raytheon.edex.plugin.gfe.db.dao.GFEDao"/>
<property name="record" value="com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord"/>
<property name="initializer" value="com.raytheon.edex.plugin.gfe.GfePluginInitializer"/>
<property name="compression" value="LZF"/>
</bean>
<bean id="gfeDbPluginProperties" class="com.raytheon.uf.edex.database.DatabasePluginProperties">
<property name="pluginFQN" value="com.raytheon.edex.plugin.gfe"/>
<property name="database" value="metadata"/>
</bean>
<bean id="gfeRegistered" factory-bean="pluginRegistry" factory-method="register" depends-on="gridRegistered, satelliteRegistered, textRegistered">
<constructor-arg value="gfe"/>
<constructor-arg ref="gfeProperties"/>
</bean>
<bean id="gfeDbRegistered" factory-bean="dbPluginRegistry" factory-method="register" depends-on="gfeRegistered">
<constructor-arg value="com.raytheon.edex.plugin.gfe"/>
<constructor-arg ref="gfeDbPluginProperties"/>
</bean>
<bean id="gfeSiteActivation" class="com.raytheon.edex.plugin.gfe.config.GFESiteActivation" factory-method="getInstance"
depends-on="commonTimeRegistered, gfeDbRegistered">
</bean>
<bean id="gfeNotifyFilter" class="com.raytheon.edex.plugin.gfe.server.notify.GfeNotificationFilter"/>
<bean id="ifpServer" class="com.raytheon.edex.plugin.gfe.server.IFPServer.Wrapper"/>
<camelContext id="gfe-common-camel" xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="errorHandler">
<route id="gfeNotify">
<from uri="vm:edex.gfeNotification?size=5000"/>
<doTry>
<filter>
<method bean="gfeNotifyFilter" method="isGfeNotification"/>
<bean ref="serializationUtil" method="transformToThrift"/>
<to uri="jms-generic:topic:edex.alerts.gfe?timeToLive=60000"/>
</filter>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:gfeNotify?level=ERROR"/>
</doCatch>
</doTry>
</route>
<route id="notifyIfpServer">
<from uri="jms-generic:topic:edex.alerts.gfe?threadName=notifyIfpServer-edex.alerts.gfe" />
<doTry>
<bean ref="serializationUtil" method="transformFromThrift"/>
<bean ref="ifpServer" method="processNotification"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:ifpServer?level=ERROR"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>