Package scriptella.driver.spring
Class BatchEtlExecutorBean
java.lang.Object
scriptella.driver.spring.BatchEtlExecutorBean
- All Implemented Interfaces:
Runnable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.InitializingBean
public class BatchEtlExecutorBean
extends Object
implements Runnable, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanFactoryAware
Batched implementation to run
ETL executors for Spring IoC container.
This class exposes a set of configurable properties and provides
a Runnable invocation interface to avoid dependency on Scriptella
in application code.
Use init-method="run" to automatically start execution of ETL files on Spring initialization.
Example
Spring XML configuration file:
<bean class="scriptella.driver.spring.BatchEtlExecutorBean" init-method="run">
<property name="configLocations"><list>
<value>/scriptella/driver/spring/batch1.etl.xml
<value>/scriptella/driver/spring/batch2.etl.xml
</list></property>
<property name="properties">
<map>
<entry key="tableName" value="Batch"/>
</map>
</property>
</bean>
- Version:
- 1.0
- Author:
- Fyodor Kupolov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidrun()Executes ETL files in a batch.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidsetConfigLocations(org.springframework.core.io.Resource[] resources) Sets configuration locations.voidsetJmxEnabled(boolean jmxEnabled) voidsetProgressIndicator(ProgressIndicator progressIndicator) Sets progress indicator to use.voidsetProperties(Map<String, ?> properties)
-
Constructor Details
-
BatchEtlExecutorBean
public BatchEtlExecutorBean()Creates scripts executor.
-
-
Method Details
-
setJmxEnabled
public void setJmxEnabled(boolean jmxEnabled) -
setProgressIndicator
Sets progress indicator to use.By default no progress shown.
- Parameters:
progressIndicator- progress indicator to use.
-
setConfigLocations
Sets configuration locations.- Parameters:
resources- configuration resources.- Throws:
IOException- if I/O error occurs
-
setProperties
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
run
public void run()Executes ETL files in a batch. -
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-