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 Details

    • BatchEtlExecutorBean

      public BatchEtlExecutorBean()
      Creates scripts executor.
  • Method Details

    • setJmxEnabled

      public void setJmxEnabled(boolean jmxEnabled)
    • setProgressIndicator

      public void setProgressIndicator(ProgressIndicator progressIndicator)
      Sets progress indicator to use.

      By default no progress shown.

      Parameters:
      progressIndicator - progress indicator to use.
    • setConfigLocations

      public void setConfigLocations(org.springframework.core.io.Resource[] resources) throws IOException
      Sets configuration locations.
      Parameters:
      resources - configuration resources.
      Throws:
      IOException - if I/O error occurs
    • setProperties

      public void setProperties(Map<String,?> properties)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • run

      public void run()
      Executes ETL files in a batch.
      Specified by:
      run in interface Runnable
    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException