awips2/edexOsgi/com.raytheon.uf.edex.stats/res/spring/edex-process-stats.xml
Benjamin Phillippe 541646148b Issue #1802 Refactored DD transaction management
Change-Id: Idec6238188f29f51f3738d2e40f95d6c562cfe39

Former-commit-id: 4675bed4c2 [formerly b10b1150be] [formerly af05feb5a7 [formerly 534777d96a45b275abd9cc26818b7df200974595]]
Former-commit-id: af05feb5a7
Former-commit-id: 4d1a8805ab
2013-03-25 15:15:38 -05:00

51 lines
2.2 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://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="statsPurge"
class="com.raytheon.uf.edex.stats.StatsPurge"
depends-on="statsRegister"/>
<bean id="aggregateManager" class="com.raytheon.uf.edex.stats.AggregateManager">
<constructor-arg value="${stats.period}"/>
<property name="aggregateDao" ref="aggregateRecordDao"/>
<property name="jaxbManager" ref="statsGroupingColumnJaxbManager"/>
</bean>
<bean id="edexStatsRegistered" factory-bean="clusteredCamelContextMgr"
factory-method="register" depends-on="persistCamelRegistered">
<constructor-arg ref="edexStats-camel"/>
</bean>
<bean id="aggregateRecordDao" class="com.raytheon.uf.edex.stats.dao.AggregateRecordDao">
<property name="sessionFactory" ref="metadataSessionFactory"/>
</bean>
<bean id="statsGroupingColumnJaxbManager" class="com.raytheon.uf.common.serialization.JAXBManager">
<constructor-arg value="com.raytheon.uf.common.stats.StatsGroupingColumn"/>
</bean>
<camelContext id="edexStats-camel"
xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
<endpoint id="statsScanTimer" uri="timer://scanStats?period=${stats.scanInterval}m"/>
<route id="statsTableScan">
<from ref="statsScanTimer" />
<doTry>
<bean ref="statsPurge" method="purgeAggregates"/>
<bean ref="aggregateManager" method="scan"/>
<doCatch>
<exception>java.lang.Throwable</exception>
<to uri="log:stats?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true"/>
</doCatch>
</doTry>
</route>
</camelContext>
</beans>