Add @Transactional to SimpleJobRepostory.stop()

This commit is contained in:
dsyer
2008-12-31 07:29:23 +00:00
parent a9688adf76
commit d8c3020176
4 changed files with 16 additions and 5 deletions

View File

@@ -1,6 +1,10 @@
package org.springframework.batch.sample;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.springframework.batch.core.BatchStatus.STARTED;
import static org.springframework.batch.core.BatchStatus.STOPPED;
import java.util.List;
import java.util.Map;
@@ -11,7 +15,6 @@ import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.springframework.batch.core.BatchStatus.*;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.core.configuration.ListableJobRegistry;
@@ -22,7 +25,7 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration()
@ContextConfiguration
public class JobOperatorFunctionalTests {
private static final Log logger = LogFactory.getLog(JobOperatorFunctionalTests.class);

View File

@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
xmlns:tx="http://www.springframework.org/schema/tx">
<import resource="classpath:/simple-job-launcher-context.xml" />
<import resource="classpath:/jobs/infiniteLoopJob.xml" />
<tx:annotation-driven/>
</beans>