IN PROGRESS - issue BATCH-127: Allow job configuration to control re-entrant behavior
http://opensource.atlassian.com/projects/spring/browse/BATCH-127 Refactor JobRepository.findOrCreateJob() to return JobExecution.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
# Placeholders batch.*
|
||||
# for HSQLDB:
|
||||
batch.jdbc.driver=org.hsqldb.jdbcDriver
|
||||
batch.jdbc.url=jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true
|
||||
# batch.jdbc.url=jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true
|
||||
# use this one for a separate server process (so you can inspect the results)
|
||||
# batch.jdbc.url=jdbc:hsqldb:hsql://localhost:9005/samples
|
||||
batch.jdbc.url=jdbc:hsqldb:hsql://localhost:9005/samples
|
||||
batch.jdbc.user=sa
|
||||
batch.jdbc.password=
|
||||
batch.schema=
|
||||
|
||||
@@ -33,17 +33,17 @@ INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 1000
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (3, 0, 'customer3', 100000);
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (4, 0, 'customer4', 100000);
|
||||
|
||||
|
||||
CREATE TABLE PLAYERS (
|
||||
PLAYER_ID char(8) NOT NULL PRIMARY KEY,
|
||||
LAST_NAME varchar(35) not null,
|
||||
FIRST_NAME varchar(25) not null,
|
||||
POS varchar(10),
|
||||
YEAR_OF_BIRTH BIGINT not null,
|
||||
YEAR_DRAFTED BIGINT not null);
|
||||
YEAR_DRAFTED BIGINT not null
|
||||
);
|
||||
|
||||
CREATE TABLE GAMES (
|
||||
PLAYER_ID char(8) not null PRIMARY KEY,
|
||||
PLAYER_ID char(8) not null,
|
||||
YEAR BIGINT not null,
|
||||
TEAM char(3) not null,
|
||||
WEEK BIGINT not null,
|
||||
@@ -61,7 +61,7 @@ CREATE TABLE GAMES (
|
||||
);
|
||||
|
||||
CREATE TABLE PLAYER_SUMMARY (
|
||||
ID CHAR(8) NOT NULL PRIMARY KEY,
|
||||
ID CHAR(8) NOT NULL,
|
||||
YEAR BIGINT NOT NULL,
|
||||
COMPLETES BIGINT NOT NULL ,
|
||||
ATTEMPTS BIGINT NOT NULL ,
|
||||
@@ -72,4 +72,5 @@ CREATE TABLE PLAYER_SUMMARY (
|
||||
RUSH_YARDS BIGINT NOT NULL ,
|
||||
RECEPTIONS BIGINT NOT NULL ,
|
||||
RECEPTIONS_YARDS BIGINT NOT NULL ,
|
||||
TOTAL_TD BIGINT NOT NULL );
|
||||
TOTAL_TD BIGINT NOT NULL
|
||||
);
|
||||
@@ -33,17 +33,17 @@ INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 1000
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (3, 0, 'customer3', 100000);
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (4, 0, 'customer4', 100000);
|
||||
|
||||
|
||||
CREATE TABLE PLAYERS (
|
||||
PLAYER_ID char(8) NOT NULL PRIMARY KEY,
|
||||
LAST_NAME varchar(35) not null,
|
||||
FIRST_NAME varchar(25) not null,
|
||||
POS varchar(10),
|
||||
YEAR_OF_BIRTH BIGINT not null,
|
||||
YEAR_DRAFTED BIGINT not null);
|
||||
YEAR_DRAFTED BIGINT not null
|
||||
);
|
||||
|
||||
CREATE TABLE GAMES (
|
||||
PLAYER_ID char(8) not null PRIMARY KEY,
|
||||
PLAYER_ID char(8) not null,
|
||||
YEAR BIGINT not null,
|
||||
TEAM char(3) not null,
|
||||
WEEK BIGINT not null,
|
||||
@@ -61,7 +61,7 @@ CREATE TABLE GAMES (
|
||||
);
|
||||
|
||||
CREATE TABLE PLAYER_SUMMARY (
|
||||
ID CHAR(8) NOT NULL PRIMARY KEY,
|
||||
ID CHAR(8) NOT NULL,
|
||||
YEAR BIGINT NOT NULL,
|
||||
COMPLETES BIGINT NOT NULL ,
|
||||
ATTEMPTS BIGINT NOT NULL ,
|
||||
@@ -72,4 +72,5 @@ CREATE TABLE PLAYER_SUMMARY (
|
||||
RUSH_YARDS BIGINT NOT NULL ,
|
||||
RECEPTIONS BIGINT NOT NULL ,
|
||||
RECEPTIONS_YARDS BIGINT NOT NULL ,
|
||||
TOTAL_TD BIGINT NOT NULL );
|
||||
TOTAL_TD BIGINT NOT NULL
|
||||
);
|
||||
@@ -37,7 +37,6 @@ INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 1000
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (3, 0, 'customer3', 100000);
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (4, 0, 'customer4', 100000);
|
||||
|
||||
|
||||
CREATE TABLE PLAYERS (
|
||||
PLAYER_ID char(8) NOT NULL PRIMARY KEY,
|
||||
LAST_NAME varchar(35) not null,
|
||||
@@ -48,7 +47,7 @@ CREATE TABLE PLAYERS (
|
||||
);
|
||||
|
||||
CREATE TABLE GAMES (
|
||||
PLAYER_ID char(8) not null PRIMARY KEY,
|
||||
PLAYER_ID char(8) not null,
|
||||
YEAR BIGINT not null,
|
||||
TEAM char(3) not null,
|
||||
WEEK BIGINT not null,
|
||||
@@ -66,7 +65,7 @@ CREATE TABLE GAMES (
|
||||
);
|
||||
|
||||
CREATE TABLE PLAYER_SUMMARY (
|
||||
ID CHAR(8) NOT NULL PRIMARY KEY,
|
||||
ID CHAR(8) NOT NULL,
|
||||
YEAR BIGINT NOT NULL,
|
||||
COMPLETES BIGINT NOT NULL ,
|
||||
ATTEMPTS BIGINT NOT NULL ,
|
||||
|
||||
@@ -33,17 +33,17 @@ INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 1000
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (3, 0, 'customer3', 100000);
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (4, 0, 'customer4', 100000);
|
||||
|
||||
|
||||
CREATE TABLE PLAYERS (
|
||||
PLAYER_ID char(8) NOT NULL PRIMARY KEY,
|
||||
LAST_NAME varchar(35) not null,
|
||||
FIRST_NAME varchar(25) not null,
|
||||
POS varchar(10),
|
||||
YEAR_OF_BIRTH NUMBER(38) not null,
|
||||
YEAR_DRAFTED NUMBER(38) not null);
|
||||
YEAR_DRAFTED NUMBER(38) not null
|
||||
);
|
||||
|
||||
CREATE TABLE GAMES (
|
||||
PLAYER_ID char(8) not null PRIMARY KEY,
|
||||
PLAYER_ID char(8) not null,
|
||||
YEAR NUMBER(38) not null,
|
||||
TEAM char(3) not null,
|
||||
WEEK NUMBER(38) not null,
|
||||
@@ -61,7 +61,7 @@ CREATE TABLE GAMES (
|
||||
);
|
||||
|
||||
CREATE TABLE PLAYER_SUMMARY (
|
||||
ID CHAR(8) NOT NULL PRIMARY KEY,
|
||||
ID CHAR(8) NOT NULL,
|
||||
YEAR NUMBER(38) NOT NULL,
|
||||
COMPLETES NUMBER(38) NOT NULL ,
|
||||
ATTEMPTS NUMBER(38) NOT NULL ,
|
||||
@@ -72,4 +72,5 @@ CREATE TABLE PLAYER_SUMMARY (
|
||||
RUSH_YARDS NUMBER(38) NOT NULL ,
|
||||
RECEPTIONS NUMBER(38) NOT NULL ,
|
||||
RECEPTIONS_YARDS NUMBER(38) NOT NULL ,
|
||||
TOTAL_TD NUMBER(38) NOT NULL );
|
||||
TOTAL_TD NUMBER(38) NOT NULL
|
||||
);
|
||||
@@ -33,17 +33,17 @@ INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 1000
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (3, 0, 'customer3', 100000);
|
||||
INSERT INTO customer (id, version, name, credit) VALUES (4, 0, 'customer4', 100000);
|
||||
|
||||
|
||||
CREATE TABLE PLAYERS (
|
||||
PLAYER_ID char(8) NOT NULL PRIMARY KEY,
|
||||
LAST_NAME varchar(35) not null,
|
||||
FIRST_NAME varchar(25) not null,
|
||||
POS varchar(10),
|
||||
YEAR_OF_BIRTH BIGINT not null,
|
||||
YEAR_DRAFTED BIGINT not null);
|
||||
YEAR_DRAFTED BIGINT not null
|
||||
);
|
||||
|
||||
CREATE TABLE GAMES (
|
||||
PLAYER_ID char(8) not null PRIMARY KEY,
|
||||
PLAYER_ID char(8) not null,
|
||||
YEAR BIGINT not null,
|
||||
TEAM char(3) not null,
|
||||
WEEK BIGINT not null,
|
||||
@@ -61,7 +61,7 @@ CREATE TABLE GAMES (
|
||||
);
|
||||
|
||||
CREATE TABLE PLAYER_SUMMARY (
|
||||
ID CHAR(8) NOT NULL PRIMARY KEY,
|
||||
ID CHAR(8) NOT NULL,
|
||||
YEAR BIGINT NOT NULL,
|
||||
COMPLETES BIGINT NOT NULL ,
|
||||
ATTEMPTS BIGINT NOT NULL ,
|
||||
@@ -72,4 +72,5 @@ CREATE TABLE PLAYER_SUMMARY (
|
||||
RUSH_YARDS BIGINT NOT NULL ,
|
||||
RECEPTIONS BIGINT NOT NULL ,
|
||||
RECEPTIONS_YARDS BIGINT NOT NULL ,
|
||||
TOTAL_TD BIGINT NOT NULL );
|
||||
TOTAL_TD BIGINT NOT NULL
|
||||
);
|
||||
@@ -114,13 +114,9 @@
|
||||
</bean>
|
||||
|
||||
<bean id="playerFileInputSource"
|
||||
class="org.springframework.batch.io.file.support.DefaultFlatFileInputSource">
|
||||
<property name="resource">
|
||||
<bean
|
||||
class="org.springframework.core.io.ClassPathResource">
|
||||
<constructor-arg value="data/footballjob/input/player.csv" />
|
||||
</bean>
|
||||
</property>
|
||||
class="org.springframework.batch.io.file.support.DefaultFlatFileInputSource" scope="step">
|
||||
<aop:scoped-proxy/>
|
||||
<property name="resource" value="classpath:data/footballjob/input/player.csv" />
|
||||
<property name="tokenizer">
|
||||
<bean
|
||||
class="org.springframework.batch.io.file.support.transform.DelimitedLineTokenizer">
|
||||
@@ -135,13 +131,9 @@
|
||||
</bean>
|
||||
|
||||
<bean id="gameFileInputSource"
|
||||
class="org.springframework.batch.io.file.support.DefaultFlatFileInputSource">
|
||||
<property name="resource">
|
||||
<bean
|
||||
class="org.springframework.core.io.ClassPathResource">
|
||||
<constructor-arg value="data/footballjob/input/games.csv" />
|
||||
</bean>
|
||||
</property>
|
||||
class="org.springframework.batch.io.file.support.DefaultFlatFileInputSource" scope="step">
|
||||
<aop:scoped-proxy/>
|
||||
<property name="resource" value="classpath:data/footballjob/input/games.csv"/>
|
||||
<property name="tokenizer">
|
||||
<bean
|
||||
class="org.springframework.batch.io.file.support.transform.DelimitedLineTokenizer">
|
||||
@@ -156,7 +148,8 @@
|
||||
</bean>
|
||||
|
||||
<bean id="playerSummarizationSource"
|
||||
class="org.springframework.batch.io.cursor.JdbcCursorInputSource">
|
||||
class="org.springframework.batch.io.cursor.JdbcCursorInputSource" scope="step">
|
||||
<aop:scoped-proxy/>
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
|
||||
@@ -34,7 +34,7 @@ CREATE TABLE PLAYERS (
|
||||
);
|
||||
|
||||
CREATE TABLE GAMES (
|
||||
PLAYER_ID char(8) not null PRIMARY KEY,
|
||||
PLAYER_ID char(8) not null,
|
||||
YEAR ${BIGINT} not null,
|
||||
TEAM char(3) not null,
|
||||
WEEK ${BIGINT} not null,
|
||||
@@ -52,7 +52,7 @@ CREATE TABLE GAMES (
|
||||
);
|
||||
|
||||
CREATE TABLE PLAYER_SUMMARY (
|
||||
ID CHAR(8) NOT NULL PRIMARY KEY,
|
||||
ID CHAR(8) NOT NULL,
|
||||
YEAR ${BIGINT} NOT NULL,
|
||||
COMPLETES ${BIGINT} NOT NULL ,
|
||||
ATTEMPTS ${BIGINT} NOT NULL ,
|
||||
|
||||
@@ -50,7 +50,9 @@ public class TaskExecutorLauncher {
|
||||
};
|
||||
}).start();
|
||||
|
||||
System.out.println("Started application. Please connect using JMX.");
|
||||
System.out
|
||||
.println("Started application. "
|
||||
+ "Please connect using JMX (remember to use -Dcom.sun.management.jmxremote if you can't see anything in Jconsole).");
|
||||
System.in.read();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user