2013-01-06 14:32:24 -06:00
|
|
|
<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}"/>
|
2013-03-18 11:49:17 -05:00
|
|
|
<property name="aggregateDao" ref="aggregateRecordDao"/>
|
2013-03-28 12:08:57 -05:00
|
|
|
<property name="statsRecordDao" ref="statsDao"/>
|
2013-03-18 11:49:17 -05:00
|
|
|
<property name="jaxbManager" ref="statsGroupingColumnJaxbManager"/>
|
2013-01-06 14:32:24 -06:00
|
|
|
</bean>
|
|
|
|
|
|
|
|
<bean id="edexStatsRegistered" factory-bean="clusteredCamelContextMgr"
|
|
|
|
factory-method="register" depends-on="persistCamelRegistered">
|
|
|
|
<constructor-arg ref="edexStats-camel"/>
|
|
|
|
</bean>
|
2013-03-18 11:49:17 -05:00
|
|
|
|
|
|
|
<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>
|
2013-01-06 14:32:24 -06:00
|
|
|
|
|
|
|
<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&showBody=false&showCaughtException=true&showStackTrace=true"/>
|
|
|
|
</doCatch>
|
|
|
|
</doTry>
|
|
|
|
</route>
|
|
|
|
</camelContext>
|
|
|
|
|
|
|
|
</beans>
|