Class JobExplorerFactoryBean
java.lang.Object
org.springframework.batch.core.explore.support.AbstractJobExplorerFactoryBean
org.springframework.batch.core.explore.support.JobExplorerFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<JobExplorer>,org.springframework.beans.factory.InitializingBean
public class JobExplorerFactoryBean
extends AbstractJobExplorerFactoryBean
implements org.springframework.beans.factory.InitializingBean
A
FactoryBean that automates the creation of a
SimpleJobExplorer using JDBC DAO implementations. Requires the user
to describe what kind of database they are using.- Since:
- 2.0
- Author:
- Dave Syer, Mahmoud Ben Hassine
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected ExecutionContextDaoprotected JobExecutionDaoprotected JobInstanceDaoprotected StepExecutionDaovoidsetDataSource(DataSource dataSource) Public setter for theDataSource.voidsetJdbcOperations(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Public setter for theJdbcOperations.voidsetLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler) The lob handler to use when savingExecutionContextinstances.voidsetSerializer(ExecutionContextSerializer serializer) A custom implementation of theExecutionContextSerializer.voidsetTablePrefix(String tablePrefix) Sets the table prefix for all the batch meta-data tables.Methods inherited from class org.springframework.batch.core.explore.support.AbstractJobExplorerFactoryBean
getObjectType, isSingleton
-
Constructor Details
-
JobExplorerFactoryBean
public JobExplorerFactoryBean()
-
-
Method Details
-
setSerializer
A custom implementation of theExecutionContextSerializer. The default, if not injected, is theJackson2ExecutionContextStringSerializer.- Parameters:
serializer- used to serialize/deserialize anExecutionContext- See Also:
-
setDataSource
Public setter for theDataSource.- Parameters:
dataSource- aDataSource
-
setJdbcOperations
public void setJdbcOperations(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Public setter for theJdbcOperations. If this property is not set explicitly, a newJdbcTemplatewill be created for the configured DataSource by default.- Parameters:
jdbcOperations- aJdbcOperations
-
setTablePrefix
Sets the table prefix for all the batch meta-data tables.- Parameters:
tablePrefix- prefix for the batch meta-data tables
-
setLobHandler
public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler) The lob handler to use when savingExecutionContextinstances. Defaults to null which works for most databases.- Parameters:
lobHandler- Large object handler for savingExecutionContext
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
createExecutionContextDao
- Specified by:
createExecutionContextDaoin classAbstractJobExplorerFactoryBean- Returns:
- fully configured
ExecutionContextDaoimplementation. - Throws:
Exception- thrown if error occurs during ExecutionContextDao creation.
-
createJobInstanceDao
- Specified by:
createJobInstanceDaoin classAbstractJobExplorerFactoryBean- Returns:
- fully configured
JobInstanceDaoimplementation. - Throws:
Exception- thrown if error occurs during JobInstanceDao creation.
-
createJobExecutionDao
- Specified by:
createJobExecutionDaoin classAbstractJobExplorerFactoryBean- Returns:
- fully configured
JobExecutionDaoimplementation. - Throws:
Exception- thrown if error occurs during JobExecutionDao creation.
-
createStepExecutionDao
- Specified by:
createStepExecutionDaoin classAbstractJobExplorerFactoryBean- Returns:
- fully configured
StepExecutionDaoimplementation. - Throws:
Exception- thrown if error occurs during StepExecutionDao creation.
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<JobExplorer>- Throws:
Exception
-