awips2/edexOsgi/com.raytheon.uf.edex.maintenance/res/spring/maintenance-ingest.xml
David Gillingham 3e42bc7d2d Issue #20: Committing refactored archiver capability
Change-Id: Ifc07621d2ad7b315a8d8391ae6ae6608516ba3bf

Issue #20: Address peer review comments from previous commit.

Change-Id: Ifc07621d2ad7b315a8d8391ae6ae6608516ba3bf

Former-commit-id: 535821e5b8 [formerly bb1ac9959b] [formerly 061966f243 [formerly 47750dfd5e387238f409ead55549cbb24f5afbe1]]
Former-commit-id: 061966f243
Former-commit-id: 9f416558fa
2012-02-13 16:09:36 -06:00

69 lines
2.7 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-2.0.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<bean id="dataStoreRepacker" class="com.raytheon.uf.edex.maintenance.DataStoreRepacker">
<!-- the compression to repack at, valid values are NONE or LZF -->
<constructor-arg value="LZF" />
</bean>
<bean id="dataArchiver" class="com.raytheon.uf.edex.maintenance.archive.DataArchiver">
<constructor-arg value="/awips2/edex/data/archive"/>
</bean>
<bean id="databaseArchiver" class="com.raytheon.uf.edex.maintenance.archive.DatabaseArchiver"/>
<bean id="dataStoreArchiver" class="com.raytheon.uf.edex.maintenance.archive.DataStoreArchiver">
<!-- the compression to archive at, valid values are NONE or LZF -->
<constructor-arg value="LZF" />
</bean>
<bean id="databaseArchiverRegistered" factory-bean="dataArchiver" factory-method="registerPluginArchiver" depends-on="dataArchiver">
<constructor-arg ref="databaseArchiver"/>
</bean>
<!-- Need to register with databaseArchiver for archiving associated data store
<bean id="datastoreArchiverRegistered" factory-bean="dataArchiver" factory-method="registerPluginArchiver">
<constructor-arg ref="dataStoreArchiver"/>
</bean>
-->
<camelContext id="clusteredMaintenanceContext" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler" autoStartup="false">
<endpoint id="repackCron" uri="quartz://repack/repackScheduled/?cron=${repack.cron}"/>
<endpoint id="archiveCron" uri="quartz://archive/archiveScheduled/?cron=${archive.cron}"/>
<!-- Repack on Scheduled timer -->
<route id="repackScheduled">
<from uri="repackCron" />
<doTry>
<bean ref="dataStoreRepacker" method="repack" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:repack?level=ERROR&amp;showBody=false&amp;showCaughtException=true&amp;showStackTrace=true" />
</doCatch>
</doTry>
</route>
<!-- Archive on Scheduled timer -->
<route id="archiveScheduled">
<from uri="archiveCron" />
<doTry>
<bean ref="dataArchiver" method="archivePlugins" />
<doCatch>
<exception>java.lang.Throwable</exception>
<to
uri="log:archive?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="clusteredMaintenanceContext" />
</bean>
</beans>