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(String dbType)
Sets the database type.
|
void |
setDataSource(DataSource dataSource)
Public setter for the
DataSource . |
void |
setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory) |
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(String tablePrefix)
Sets the table prefix for all the batch meta-data tables.
|
getJobRepository, getObject, getObjectType, getTransactionManager, isSingleton, setIsolationLevelForCreate, setTransactionManager, setValidateTransactionState
public 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
- ExecutionContextSerializer
public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
lobHandler
- the LobHandler
to setLobHandler
public 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 DataSource
public void setDatabaseType(String dbType)
dbType
- as specified by
DefaultDataFieldMaxValueIncrementerFactory
public void setTablePrefix(String tablePrefix)
tablePrefix
- public void setIncrementerFactory(DataFieldMaxValueIncrementerFactory incrementerFactory)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractJobRepositoryFactoryBean
Exception
protected JobInstanceDao createJobInstanceDao() throws Exception
createJobInstanceDao
in class AbstractJobRepositoryFactoryBean
JobInstanceDao
implementation.Exception
protected JobExecutionDao createJobExecutionDao() throws Exception
createJobExecutionDao
in class AbstractJobRepositoryFactoryBean
JobExecutionDao
implementation.Exception
protected StepExecutionDao createStepExecutionDao() throws Exception
createStepExecutionDao
in class AbstractJobRepositoryFactoryBean
StepExecutionDao
implementation.Exception
protected ExecutionContextDao createExecutionContextDao() throws Exception
createExecutionContextDao
in class AbstractJobRepositoryFactoryBean
ExecutionContextDao
implementation.Exception
Copyright © 2014 Pivotal. All rights reserved.