scriptella.driver.spring
Class BatchEtlExecutorBean

java.lang.Object
  extended by scriptella.driver.spring.BatchEtlExecutorBean
All Implemented Interfaces:
java.lang.Runnable, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

public class BatchEtlExecutorBean
extends java.lang.Object
implements java.lang.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
BatchEtlExecutorBean()
          Creates scripts executor.
 
Method Summary
 void afterPropertiesSet()
           
 void run()
          Executes ETL files in a batch.
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 void setConfigLocations(org.springframework.core.io.Resource[] resources)
          Sets configuration locations.
 void setJmxEnabled(boolean jmxEnabled)
           
 void setProgressIndicator(scriptella.interactive.ProgressIndicator progressIndicator)
          Sets progress indicator to use.
 void setProperties(java.util.Map<java.lang.String,?> properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchEtlExecutorBean

public BatchEtlExecutorBean()
Creates scripts executor.

Method Detail

setJmxEnabled

public void setJmxEnabled(boolean jmxEnabled)

setProgressIndicator

public void setProgressIndicator(scriptella.interactive.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 java.io.IOException
Sets configuration locations.

Parameters:
resources - configuration resources.
Throws:
java.io.IOException - if I/O error occurs

setProperties

public void setProperties(java.util.Map<java.lang.String,?> properties)

afterPropertiesSet

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

run

public void run()
Executes ETL files in a batch.

Specified by:
run in interface java.lang.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


Copyright © Copyright 2006-2009 The Scriptella Project Team.