Example usage for org.springframework.batch.core.repository.support JobRepositoryFactoryBean setLobHandler

List of usage examples for org.springframework.batch.core.repository.support JobRepositoryFactoryBean setLobHandler

Introduction

In this page you can find the example usage for org.springframework.batch.core.repository.support JobRepositoryFactoryBean setLobHandler.

Prototype

public void setLobHandler(LobHandler lobHandler) 

Source Link

Document

A special handler for large objects.

Usage

From source file:com.example.configuration.BatchConfiguration.java

public JobRepository getJobRepository() throws Exception {
    JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
    factory.setDataSource(config.dataSource());
    factory.setTransactionManager(transactionManager);
    factory.setLobHandler(lobHandler());
    factory.setDatabaseType(DatabaseType.fromMetaData(config.dataSource()).name());
    factory.setIsolationLevelForCreate("ISOLATION_DEFAULT");
    factory.afterPropertiesSet();//from w  ww  .  ja  va  2s  .c  o  m
    return (JobRepository) factory.getObject();
}