public class SimpleJobServiceFactoryBean extends Object implements FactoryBean<JobService>, InitializingBean
JobService that makes the configuration of its
various ingredients as convenient as possible.| Constructor and Description |
|---|
SimpleJobServiceFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected ExecutionContextDao |
createExecutionContextDao() |
protected SearchableJobExecutionDao |
createJobExecutionDao() |
protected SearchableJobInstanceDao |
createJobInstanceDao() |
protected SearchableStepExecutionDao |
createStepExecutionDao() |
JobService |
getObject()
Create a
SimpleJobService from the configuration provided. |
Class<? extends JobService> |
getObjectType()
Tells the containing bean factory what kind of object is the product of
getObject(). |
boolean |
isSingleton()
Allows optimisation in the containing bean factory.
|
void |
setDatabaseType(String dbType)
Sets the database type.
|
void |
setDataSource(DataSource dataSource)
Public setter for the
DataSource. |
void |
setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory)
A factory for incrementers (used to build primary keys for meta data).
|
void |
setJobExplorer(JobExplorer jobExplorer) |
void |
setJobLauncher(JobLauncher jobLauncher)
The launcher used to run jobs.
|
void |
setJobLocator(ListableJobLocator jobLocator)
A registry that can be used to locate jobs to run.
|
void |
setJobRepository(JobRepository jobRepository)
The repository used to store and update jobs and step executions.
|
void |
setLobHandler(LobHandler lobHandler)
A special handler for large objects.
|
void |
setMaxVarCharLength(int maxVarCharLength)
Public setter for the length of long string columns in database.
|
void |
setSerializer(ExecutionContextSerializer serializer)
A custom implementation of the
ExecutionContextSerializer. |
void |
setTablePrefix(String tablePrefix)
Sets the table prefix for all the batch meta-data tables.
|
void |
setTransactionManager(PlatformTransactionManager transactionManager) |
public void setTransactionManager(PlatformTransactionManager transactionManager)
public void setLobHandler(LobHandler lobHandler)
lobHandler - the LobHandler to setLobHandlerpublic void setMaxVarCharLength(int maxVarCharLength)
JdbcJobExecutionDao and
JdbcStepExecutionDao and also the short version of the execution
context in JdbcExecutionContextDao . For databases with
multi-byte character sets this number can be smaller (by up to a factor
of 2 for 2-byte characters) than the declaration of the column length in
the DDL for the tables.maxVarCharLength - the exitMessageLength to setpublic void setDataSource(DataSource dataSource)
DataSource.dataSource - a DataSourcepublic void setDatabaseType(String dbType)
dbType - as specified by
DefaultDataFieldMaxValueIncrementerFactorypublic void setTablePrefix(String tablePrefix)
tablePrefix - Prefix for batch meta-data tablespublic void setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory)
DefaultDataFieldMaxValueIncrementerFactory.incrementerFactory - the incrementer factory to setpublic void setJobExplorer(JobExplorer jobExplorer)
public void setJobRepository(JobRepository jobRepository)
jobRepository - the JobRepository to setpublic void setJobLauncher(JobLauncher jobLauncher)
jobLauncher - a JobLauncherpublic void setJobLocator(ListableJobLocator jobLocator)
jobLocator - a JobLocatorpublic void setSerializer(ExecutionContextSerializer serializer)
ExecutionContextSerializer. The
default, if not injected, is the
XStreamExecutionContextStringSerializer.serializer - the serializer to setExecutionContextSerializerpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionprotected SearchableJobInstanceDao createJobInstanceDao() throws Exception
Exceptionprotected SearchableJobExecutionDao createJobExecutionDao() throws Exception
Exceptionprotected SearchableStepExecutionDao createStepExecutionDao() throws Exception
Exceptionprotected ExecutionContextDao createExecutionContextDao() throws Exception
Exceptionpublic JobService getObject() throws Exception
SimpleJobService from the configuration provided.getObject in interface FactoryBean<JobService>ExceptionFactoryBean.getObject()public Class<? extends JobService> getObjectType()
getObject().getObjectType in interface FactoryBean<JobService>FactoryBean.getObjectType()public boolean isSingleton()
isSingleton in interface FactoryBean<JobService>FactoryBean.isSingleton()Copyright © 2015. All rights reserved.