BATCH-1786: Added type to AbstractJobExplorerFactoryBean so that a cast isn't required on getObject()
This commit is contained in:
@@ -70,7 +70,6 @@ public class DefaultBatchConfigurer implements BatchConfigurer {
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
<<<<<<< HEAD
|
||||
public void initialize() throws Exception {
|
||||
if(dataSource == null) {
|
||||
logger.warn("No datasource was provided...using a Map based JobRepository");
|
||||
@@ -87,15 +86,6 @@ public class DefaultBatchConfigurer implements BatchConfigurer {
|
||||
}
|
||||
|
||||
this.jobLauncher = createJobLauncher();
|
||||
=======
|
||||
public void initialize() throws BatchConfigurationException {
|
||||
try {
|
||||
this.jobRepository = createJobRepository();
|
||||
this.jobLauncher = createJobLauncher();
|
||||
} catch (Exception e) {
|
||||
throw new BatchConfigurationException(e);
|
||||
}
|
||||
>>>>>>> 3a2cac3... BATCH-2189: Wrapped checked exception with a custom RuntimeException to follow rules for @PostConstruct
|
||||
}
|
||||
|
||||
private JobLauncher createJobLauncher() throws Exception {
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.batch.core.explore.support;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.batch.core.explore.JobExplorer;
|
||||
import org.springframework.batch.core.repository.ExecutionContextSerializer;
|
||||
import org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao;
|
||||
@@ -40,6 +38,8 @@ import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer
|
||||
import org.springframework.jdbc.support.lob.LobHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* A {@link FactoryBean} that automates the creation of a
|
||||
* {@link SimpleJobExplorer} using JDBC DAO implementations. Requires the user
|
||||
@@ -72,7 +72,7 @@ implements InitializingBean {
|
||||
* A custom implementation of the {@link ExecutionContextSerializer}.
|
||||
* The default, if not injected, is the {@link XStreamExecutionContextStringSerializer}.
|
||||
*
|
||||
* @param serializer
|
||||
* @param serializer used to serialize/deserialize an {@link org.springframework.batch.item.ExecutionContext}
|
||||
* @see ExecutionContextSerializer
|
||||
*/
|
||||
public void setSerializer(ExecutionContextSerializer serializer) {
|
||||
@@ -101,7 +101,7 @@ implements InitializingBean {
|
||||
/**
|
||||
* Sets the table prefix for all the batch meta-data tables.
|
||||
*
|
||||
* @param tablePrefix
|
||||
* @param tablePrefix prefix for the batch meta-data tables
|
||||
*/
|
||||
public void setTablePrefix(String tablePrefix) {
|
||||
this.tablePrefix = tablePrefix;
|
||||
@@ -111,7 +111,7 @@ implements InitializingBean {
|
||||
* The lob handler to use when saving {@link ExecutionContext} instances.
|
||||
* Defaults to null which works for most databases.
|
||||
*
|
||||
* @param lobHandler
|
||||
* @param lobHandler Large object handler for saving {@link org.springframework.batch.item.ExecutionContext}
|
||||
*/
|
||||
public void setLobHandler(LobHandler lobHandler) {
|
||||
this.lobHandler = lobHandler;
|
||||
|
||||
@@ -39,8 +39,8 @@ public class MapJobExplorerFactoryBean extends AbstractJobExplorerFactoryBean im
|
||||
|
||||
/**
|
||||
* Create an instance with the provided {@link MapJobRepositoryFactoryBean}
|
||||
* as a source of DAO instances.
|
||||
* @param repositoryFactory
|
||||
* as a source of Dao instances.
|
||||
* @param repositoryFactory provides the used {@link org.springframework.batch.core.repository.JobRepository}
|
||||
*/
|
||||
public MapJobExplorerFactoryBean(MapJobRepositoryFactoryBean repositoryFactory) {
|
||||
this.repositoryFactory = repositoryFactory;
|
||||
|
||||
@@ -26,7 +26,6 @@ import javax.sql.DataSource;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.core.explore.JobExplorer;
|
||||
import org.springframework.batch.core.explore.support.JobExplorerFactoryBean;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
Reference in New Issue
Block a user