public class JobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean implements org.springframework.beans.factory.InitializingBean
FactoryBean that automates the creation of a
SimpleJobRepository using JDBC DAO implementations which persist
batch metadata in database. Requires the user to describe what kind of
database they are using.| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
JobRepositoryFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected ExecutionContextDao |
createExecutionContextDao() |
protected JobExecutionDao |
createJobExecutionDao() |
protected JobInstanceDao |
createJobInstanceDao() |
protected StepExecutionDao |
createStepExecutionDao() |
void |
setClobType(int type) |
void |
setDatabaseType(java.lang.String dbType)
Sets the database type.
|
void |
setDataSource(javax.sql.DataSource dataSource)
Public setter for the
DataSource. |
void |
setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory) |
void |
setJdbcOperations(org.springframework.jdbc.core.JdbcOperations jdbcOperations)
Public setter for the
JdbcOperations. |
void |
setLobHandler(org.springframework.jdbc.support.lob.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(java.lang.String tablePrefix)
Sets the table prefix for all the batch meta-data tables.
|
getJobRepository, getObject, getObjectType, getTransactionManager, isSingleton, setIsolationLevelForCreate, setTransactionManager, setValidateTransactionStatepublic void setClobType(int type)
type - a value from the Types class to indicate the type to use for a CLOBpublic void setSerializer(ExecutionContextSerializer serializer)
ExecutionContextSerializer.
The default, if not injected, is the XStreamExecutionContextStringSerializer.serializer - used to serialize/deserialize ExecutionContextExecutionContextSerializerpublic void setLobHandler(org.springframework.jdbc.support.lob.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(javax.sql.DataSource dataSource)
DataSource.dataSource - a DataSourcepublic void setJdbcOperations(org.springframework.jdbc.core.JdbcOperations jdbcOperations)
JdbcOperations. If this property is not set explicitly,
a new JdbcTemplate will be created for the configured DataSource by default.jdbcOperations - a JdbcOperationspublic void setDatabaseType(java.lang.String dbType)
dbType - as specified by
DefaultDataFieldMaxValueIncrementerFactorypublic void setTablePrefix(java.lang.String tablePrefix)
tablePrefix - prefix prepended to batch meta-data tablespublic void setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory)
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class AbstractJobRepositoryFactoryBeanjava.lang.Exceptionprotected JobInstanceDao createJobInstanceDao() throws java.lang.Exception
createJobInstanceDao in class AbstractJobRepositoryFactoryBeanJobInstanceDao implementation.java.lang.Exceptionprotected JobExecutionDao createJobExecutionDao() throws java.lang.Exception
createJobExecutionDao in class AbstractJobRepositoryFactoryBeanJobExecutionDao implementation.java.lang.Exceptionprotected StepExecutionDao createStepExecutionDao() throws java.lang.Exception
createStepExecutionDao in class AbstractJobRepositoryFactoryBeanStepExecutionDao implementation.java.lang.Exceptionprotected ExecutionContextDao createExecutionContextDao() throws java.lang.Exception
createExecutionContextDao in class AbstractJobRepositoryFactoryBeanExecutionContextDao implementation.java.lang.Exception