diff --git a/pom.xml b/pom.xml index 30ee1c933..9025429c4 100644 --- a/pom.xml +++ b/pom.xml @@ -686,6 +686,16 @@ ObjectStyle.org Repository http://objectstyle.org/maven2/ + + com.springsource.repository.bundles.release + SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases + http://repository.springsource.com/maven/bundles/release + + + com.springsource.repository.bundles.external + SpringSource Enterprise Bundle Repository - External Bundle Releases + http://repository.springsource.com/maven/bundles/external + diff --git a/spring-batch-samples/pom.xml b/spring-batch-samples/pom.xml index b6341d087..98aea38c9 100644 --- a/spring-batch-samples/pom.xml +++ b/spring-batch-samples/pom.xml @@ -189,6 +189,18 @@ 10.2.1.6 test + + net.sourceforge.jtds + jtds + 1.2.2 + test + + + com.oracle.jdbc + com.springsource.oracle.jdbc + 10.2.0.2 + test + org.springframework @@ -343,6 +355,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-batch-samples/src/main/resources/batch-oracle.properties b/spring-batch-samples/src/main/resources/batch-oracle.properties new file mode 100644 index 000000000..98e17433e --- /dev/null +++ b/spring-batch-samples/src/main/resources/batch-oracle.properties @@ -0,0 +1,15 @@ +# Placeholders batch.* +# for MS SQLServer: +batch.jdbc.driver=oracle.jdbc.OracleDriver +batch.jdbc.url=jdbc:oracle:thin:@//dbhost:1521/xe +batch.jdbc.user=spring +batch.jdbc.password=spring +batch.schema= +batch.jndi.name= +batch.naming.factory.initial= +batch.naming.provider.url= +batch.schema.script=schema-oracle10g.sql +batch.business.schema.script=business-schema-oracle10g.sql +batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer +batch.lob.handler.class=org.springframework.jdbc.support.lob.DefaultLobHandler + diff --git a/spring-batch-samples/src/main/resources/batch-sqlserver.properties b/spring-batch-samples/src/main/resources/batch-sqlserver.properties new file mode 100644 index 000000000..f2ec1971c --- /dev/null +++ b/spring-batch-samples/src/main/resources/batch-sqlserver.properties @@ -0,0 +1,18 @@ +# Placeholders batch.* +# for MS SQLServer: +batch.jdbc.driver=net.sourceforge.jtds.jdbc.Driver +batch.jdbc.url=jdbc:jtds:sqlserver://dbhost:1433;databaseName=test +batch.jdbc.user=spring +batch.jdbc.password=spring +batch.schema= +batch.jndi.name= +batch.naming.factory.initial= +batch.naming.provider.url= +batch.schema.script=schema-sqlserver.sql +batch.business.schema.script=business-schema-sqlserver.sql +batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.SqlServerMaxValueIncrementer +batch.lob.handler.class=org.springframework.jdbc.support.lob.DefaultLobHandler + +# Bean Properties for override +# when not using sequences: +incrementerParent.columnName=ID diff --git a/spring-batch-samples/src/main/resources/batch-sybase.properties b/spring-batch-samples/src/main/resources/batch-sybase.properties new file mode 100644 index 000000000..3a3565ad7 --- /dev/null +++ b/spring-batch-samples/src/main/resources/batch-sybase.properties @@ -0,0 +1,18 @@ +# Placeholders batch.* +# for MySQL: +batch.jdbc.driver=net.sourceforge.jtds.jdbc.Driver +batch.jdbc.url=jdbc:jtds:sybase://dbhost:5000;databaseName=test +batch.jdbc.user=spring +batch.jdbc.password=spring +batch.schema= +batch.jndi.name= +batch.naming.factory.initial= +batch.naming.provider.url= +batch.schema.script=schema-sybase.sql +batch.business.schema.script=business-schema-sybase.sql +batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.SybaseMaxValueIncrementer +batch.lob.handler.class=org.springframework.jdbc.support.lob.DefaultLobHandler + +# Bean Properties for override +# when not using sequences: +incrementerParent.columnName=ID diff --git a/spring-batch-samples/src/main/resources/business-schema-db2.sql b/spring-batch-samples/src/main/resources/business-schema-db2.sql index 00c316fc5..b952be094 100644 --- a/spring-batch-samples/src/main/resources/business-schema-db2.sql +++ b/spring-batch-samples/src/main/resources/business-schema-db2.sql @@ -1,86 +1,86 @@ --- Autogenerated: do not edit this file -DROP SEQUENCE BATCH_STAGING_SEQ ; -DROP SEQUENCE TRADE_SEQ ; -DROP SEQUENCE CUSTOMER_SEQ ; -DROP TABLE BATCH_STAGING ; -DROP TABLE TRADE ; -DROP TABLE CUSTOMER ; -DROP TABLE PLAYERS ; -DROP TABLE GAMES ; -DROP TABLE PLAYER_SUMMARY ; - --- Autogenerated: do not edit this file - -CREATE SEQUENCE CUSTOMER_SEQ; -CREATE SEQUENCE BATCH_STAGING_SEQ; -CREATE SEQUENCE TRADE_SEQ; - -CREATE TABLE BATCH_STAGING ( - ID BIGINT PRIMARY KEY , - JOB_ID BIGINT NOT NULL, - VALUE BLOB NOT NULL, - PROCESSED CHAR(1) NOT NULL -); - -CREATE TABLE TRADE ( - ID BIGINT PRIMARY KEY , - VERSION BIGINT, - ISIN VARCHAR(45) NOT NULL, - QUANTITY BIGINT, - PRICE DOUBLE, - CUSTOMER VARCHAR(45) -); - -CREATE TABLE CUSTOMER ( - ID BIGINT PRIMARY KEY , - VERSION BIGINT, - NAME VARCHAR(45), - CREDIT DOUBLE -); - -INSERT INTO customer (id, version, name, credit) VALUES (1, 0, 'customer1', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 100000); -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 -); - -CREATE TABLE GAMES ( - PLAYER_ID char(8) not null, - YEAR_NO BIGINT not null, - TEAM char(3) not null, - WEEK BIGINT not null, - OPPONENT char(3), - COMPLETES BIGINT, - ATTEMPTS BIGINT, - PASSING_YARDS BIGINT, - PASSING_TD BIGINT, - INTERCEPTIONS BIGINT, - RUSHES BIGINT, - RUSH_YARDS BIGINT, - RECEPTIONS BIGINT, - RECEPTIONS_YARDS BIGINT, - TOTAL_TD BIGINT -); - -CREATE TABLE PLAYER_SUMMARY ( - ID CHAR(8) NOT NULL, - YEAR_NO BIGINT NOT NULL, - COMPLETES BIGINT NOT NULL , - ATTEMPTS BIGINT NOT NULL , - PASSING_YARDS BIGINT NOT NULL , - PASSING_TD BIGINT NOT NULL , - INTERCEPTIONS BIGINT NOT NULL , - RUSHES BIGINT NOT NULL , - RUSH_YARDS BIGINT NOT NULL , - RECEPTIONS BIGINT NOT NULL , - RECEPTIONS_YARDS BIGINT NOT NULL , - TOTAL_TD BIGINT NOT NULL +-- Autogenerated: do not edit this file +DROP SEQUENCE BATCH_STAGING_SEQ ; +DROP SEQUENCE TRADE_SEQ ; +DROP SEQUENCE CUSTOMER_SEQ ; +DROP TABLE BATCH_STAGING ; +DROP TABLE TRADE ; +DROP TABLE CUSTOMER ; +DROP TABLE PLAYERS ; +DROP TABLE GAMES ; +DROP TABLE PLAYER_SUMMARY ; + +-- Autogenerated: do not edit this file + +CREATE SEQUENCE CUSTOMER_SEQ; +CREATE SEQUENCE BATCH_STAGING_SEQ; +CREATE SEQUENCE TRADE_SEQ; + +CREATE TABLE BATCH_STAGING ( + ID BIGINT NOT NULL PRIMARY KEY , + JOB_ID BIGINT NOT NULL, + VALUE BLOB NOT NULL, + PROCESSED CHAR(1) NOT NULL +); + +CREATE TABLE TRADE ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + ISIN VARCHAR(45) NOT NULL, + QUANTITY BIGINT , + PRICE DOUBLE PRECISION , + CUSTOMER VARCHAR(45) +); + +CREATE TABLE CUSTOMER ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + NAME VARCHAR(45) , + CREDIT DOUBLE PRECISION +); + +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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 +); + +CREATE TABLE GAMES ( + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK BIGINT NOT NULL, + OPPONENT CHAR(3) , + COMPLETES BIGINT , + ATTEMPTS BIGINT , + PASSING_YARDS BIGINT , + PASSING_TD BIGINT , + INTERCEPTIONS BIGINT , + RUSHES BIGINT , + RUSH_YARDS BIGINT , + RECEPTIONS BIGINT , + RECEPTIONS_YARDS BIGINT , + TOTAL_TD BIGINT +); + +CREATE TABLE PLAYER_SUMMARY ( + ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + COMPLETES BIGINT NOT NULL , + ATTEMPTS BIGINT NOT NULL , + PASSING_YARDS BIGINT NOT NULL , + PASSING_TD BIGINT NOT NULL , + INTERCEPTIONS BIGINT NOT NULL , + RUSHES BIGINT NOT NULL , + RUSH_YARDS BIGINT NOT NULL , + RECEPTIONS BIGINT NOT NULL , + RECEPTIONS_YARDS BIGINT NOT NULL , + TOTAL_TD BIGINT NOT NULL ); \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/business-schema-derby.sql b/spring-batch-samples/src/main/resources/business-schema-derby.sql index d8d5e3cc1..4b9c125dc 100644 --- a/spring-batch-samples/src/main/resources/business-schema-derby.sql +++ b/spring-batch-samples/src/main/resources/business-schema-derby.sql @@ -1,86 +1,86 @@ --- Autogenerated: do not edit this file -DROP TABLE BATCH_STAGING_SEQ ; -DROP TABLE TRADE_SEQ ; -DROP TABLE CUSTOMER_SEQ ; -DROP TABLE BATCH_STAGING ; -DROP TABLE TRADE ; -DROP TABLE CUSTOMER ; -DROP TABLE PLAYERS ; -DROP TABLE GAMES ; -DROP TABLE PLAYER_SUMMARY ; - --- Autogenerated: do not edit this file - -CREATE TABLE CUSTOMER_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1)); -CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1)); -CREATE TABLE TRADE_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1)); - -CREATE TABLE BATCH_STAGING ( - ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - JOB_ID BIGINT NOT NULL, - VALUE BLOB NOT NULL, - PROCESSED CHAR(1) NOT NULL -); - -CREATE TABLE TRADE ( - ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - VERSION BIGINT, - ISIN VARCHAR(45) NOT NULL, - QUANTITY BIGINT, - PRICE DOUBLE, - CUSTOMER VARCHAR(45) -); - -CREATE TABLE CUSTOMER ( - ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, - VERSION BIGINT, - NAME VARCHAR(45), - CREDIT DOUBLE -); - -INSERT INTO customer (id, version, name, credit) VALUES (1, 0, 'customer1', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 100000); -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 -); - -CREATE TABLE GAMES ( - PLAYER_ID char(8) not null, - YEAR_NO BIGINT not null, - TEAM char(3) not null, - WEEK BIGINT not null, - OPPONENT char(3), - COMPLETES BIGINT, - ATTEMPTS BIGINT, - PASSING_YARDS BIGINT, - PASSING_TD BIGINT, - INTERCEPTIONS BIGINT, - RUSHES BIGINT, - RUSH_YARDS BIGINT, - RECEPTIONS BIGINT, - RECEPTIONS_YARDS BIGINT, - TOTAL_TD BIGINT -); - -CREATE TABLE PLAYER_SUMMARY ( - ID CHAR(8) NOT NULL, - YEAR_NO BIGINT NOT NULL, - COMPLETES BIGINT NOT NULL , - ATTEMPTS BIGINT NOT NULL , - PASSING_YARDS BIGINT NOT NULL , - PASSING_TD BIGINT NOT NULL , - INTERCEPTIONS BIGINT NOT NULL , - RUSHES BIGINT NOT NULL , - RUSH_YARDS BIGINT NOT NULL , - RECEPTIONS BIGINT NOT NULL , - RECEPTIONS_YARDS BIGINT NOT NULL , - TOTAL_TD BIGINT NOT NULL +-- Autogenerated: do not edit this file +DROP TABLE BATCH_STAGING_SEQ ; +DROP TABLE TRADE_SEQ ; +DROP TABLE CUSTOMER_SEQ ; +DROP TABLE BATCH_STAGING ; +DROP TABLE TRADE ; +DROP TABLE CUSTOMER ; +DROP TABLE PLAYERS ; +DROP TABLE GAMES ; +DROP TABLE PLAYER_SUMMARY ; + +-- Autogenerated: do not edit this file + +CREATE TABLE CUSTOMER_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1)); +CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1)); +CREATE TABLE TRADE_SEQ (ID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, DUMMY VARCHAR(1)); + +CREATE TABLE BATCH_STAGING ( + ID BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, + JOB_ID BIGINT NOT NULL, + VALUE BLOB NOT NULL, + PROCESSED CHAR(1) NOT NULL +); + +CREATE TABLE TRADE ( + ID BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, + VERSION BIGINT , + ISIN VARCHAR(45) NOT NULL, + QUANTITY BIGINT , + PRICE DOUBLE PRECISION , + CUSTOMER VARCHAR(45) +); + +CREATE TABLE CUSTOMER ( + ID BIGINT NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, + VERSION BIGINT , + NAME VARCHAR(45) , + CREDIT DOUBLE PRECISION +); + +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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 +); + +CREATE TABLE GAMES ( + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK BIGINT NOT NULL, + OPPONENT CHAR(3) , + COMPLETES BIGINT , + ATTEMPTS BIGINT , + PASSING_YARDS BIGINT , + PASSING_TD BIGINT , + INTERCEPTIONS BIGINT , + RUSHES BIGINT , + RUSH_YARDS BIGINT , + RECEPTIONS BIGINT , + RECEPTIONS_YARDS BIGINT , + TOTAL_TD BIGINT +); + +CREATE TABLE PLAYER_SUMMARY ( + ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + COMPLETES BIGINT NOT NULL , + ATTEMPTS BIGINT NOT NULL , + PASSING_YARDS BIGINT NOT NULL , + PASSING_TD BIGINT NOT NULL , + INTERCEPTIONS BIGINT NOT NULL , + RUSHES BIGINT NOT NULL , + RUSH_YARDS BIGINT NOT NULL , + RECEPTIONS BIGINT NOT NULL , + RECEPTIONS_YARDS BIGINT NOT NULL , + TOTAL_TD BIGINT NOT NULL ); \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/business-schema-hsqldb.sql b/spring-batch-samples/src/main/resources/business-schema-hsqldb.sql index 4077fb8d9..f69c3f7bf 100644 --- a/spring-batch-samples/src/main/resources/business-schema-hsqldb.sql +++ b/spring-batch-samples/src/main/resources/business-schema-hsqldb.sql @@ -1,92 +1,92 @@ --- Autogenerated: do not edit this file -DROP TABLE BATCH_STAGING_SEQ IF EXISTS; -DROP TABLE TRADE_SEQ IF EXISTS; -DROP TABLE CUSTOMER_SEQ IF EXISTS; -DROP TABLE BATCH_STAGING IF EXISTS; -DROP TABLE TRADE IF EXISTS; -DROP TABLE CUSTOMER IF EXISTS; -DROP TABLE PLAYERS IF EXISTS; -DROP TABLE GAMES IF EXISTS; -DROP TABLE PLAYER_SUMMARY IF EXISTS; - --- Autogenerated: do not edit this file - -CREATE TABLE CUSTOMER_SEQ ( - ID BIGINT IDENTITY -); -CREATE TABLE BATCH_STAGING_SEQ ( - ID BIGINT IDENTITY -); -CREATE TABLE TRADE_SEQ ( - ID BIGINT IDENTITY -); - -CREATE TABLE BATCH_STAGING ( - ID BIGINT IDENTITY PRIMARY KEY , - JOB_ID BIGINT NOT NULL, - VALUE LONGVARBINARY NOT NULL, - PROCESSED CHAR(1) NOT NULL -); - -CREATE TABLE TRADE ( - ID BIGINT IDENTITY PRIMARY KEY , - VERSION BIGINT, - ISIN VARCHAR(45) NOT NULL, - QUANTITY BIGINT, - PRICE DOUBLE, - CUSTOMER VARCHAR(45) -); - -CREATE TABLE CUSTOMER ( - ID BIGINT IDENTITY PRIMARY KEY , - VERSION BIGINT, - NAME VARCHAR(45), - CREDIT DOUBLE -); - -INSERT INTO customer (id, version, name, credit) VALUES (1, 0, 'customer1', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 100000); -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 -); - -CREATE TABLE GAMES ( - PLAYER_ID char(8) not null, - YEAR_NO BIGINT not null, - TEAM char(3) not null, - WEEK BIGINT not null, - OPPONENT char(3), - COMPLETES BIGINT, - ATTEMPTS BIGINT, - PASSING_YARDS BIGINT, - PASSING_TD BIGINT, - INTERCEPTIONS BIGINT, - RUSHES BIGINT, - RUSH_YARDS BIGINT, - RECEPTIONS BIGINT, - RECEPTIONS_YARDS BIGINT, - TOTAL_TD BIGINT -); - -CREATE TABLE PLAYER_SUMMARY ( - ID CHAR(8) NOT NULL, - YEAR_NO BIGINT NOT NULL, - COMPLETES BIGINT NOT NULL , - ATTEMPTS BIGINT NOT NULL , - PASSING_YARDS BIGINT NOT NULL , - PASSING_TD BIGINT NOT NULL , - INTERCEPTIONS BIGINT NOT NULL , - RUSHES BIGINT NOT NULL , - RUSH_YARDS BIGINT NOT NULL , - RECEPTIONS BIGINT NOT NULL , - RECEPTIONS_YARDS BIGINT NOT NULL , - TOTAL_TD BIGINT NOT NULL +-- Autogenerated: do not edit this file +DROP TABLE BATCH_STAGING_SEQ IF EXISTS; +DROP TABLE TRADE_SEQ IF EXISTS; +DROP TABLE CUSTOMER_SEQ IF EXISTS; +DROP TABLE BATCH_STAGING IF EXISTS; +DROP TABLE TRADE IF EXISTS; +DROP TABLE CUSTOMER IF EXISTS; +DROP TABLE PLAYERS IF EXISTS; +DROP TABLE GAMES IF EXISTS; +DROP TABLE PLAYER_SUMMARY IF EXISTS; + +-- Autogenerated: do not edit this file + +CREATE TABLE CUSTOMER_SEQ ( + ID BIGINT IDENTITY +); +CREATE TABLE BATCH_STAGING_SEQ ( + ID BIGINT IDENTITY +); +CREATE TABLE TRADE_SEQ ( + ID BIGINT IDENTITY +); + +CREATE TABLE BATCH_STAGING ( + ID BIGINT IDENTITY NOT NULL PRIMARY KEY , + JOB_ID BIGINT NOT NULL, + VALUE LONGVARBINARY NOT NULL, + PROCESSED CHAR(1) NOT NULL +); + +CREATE TABLE TRADE ( + ID BIGINT IDENTITY NOT NULL PRIMARY KEY , + VERSION BIGINT , + ISIN VARCHAR(45) NOT NULL, + QUANTITY BIGINT , + PRICE DOUBLE PRECISION , + CUSTOMER VARCHAR(45) +); + +CREATE TABLE CUSTOMER ( + ID BIGINT IDENTITY NOT NULL PRIMARY KEY , + VERSION BIGINT , + NAME VARCHAR(45) , + CREDIT DOUBLE PRECISION +); + +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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 +); + +CREATE TABLE GAMES ( + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK BIGINT NOT NULL, + OPPONENT CHAR(3) , + COMPLETES BIGINT , + ATTEMPTS BIGINT , + PASSING_YARDS BIGINT , + PASSING_TD BIGINT , + INTERCEPTIONS BIGINT , + RUSHES BIGINT , + RUSH_YARDS BIGINT , + RECEPTIONS BIGINT , + RECEPTIONS_YARDS BIGINT , + TOTAL_TD BIGINT +); + +CREATE TABLE PLAYER_SUMMARY ( + ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + COMPLETES BIGINT NOT NULL , + ATTEMPTS BIGINT NOT NULL , + PASSING_YARDS BIGINT NOT NULL , + PASSING_TD BIGINT NOT NULL , + INTERCEPTIONS BIGINT NOT NULL , + RUSHES BIGINT NOT NULL , + RUSH_YARDS BIGINT NOT NULL , + RECEPTIONS BIGINT NOT NULL , + RECEPTIONS_YARDS BIGINT NOT NULL , + TOTAL_TD BIGINT NOT NULL ); \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/business-schema-mysql.sql b/spring-batch-samples/src/main/resources/business-schema-mysql.sql index fed789385..d11167a98 100644 --- a/spring-batch-samples/src/main/resources/business-schema-mysql.sql +++ b/spring-batch-samples/src/main/resources/business-schema-mysql.sql @@ -1,89 +1,89 @@ --- Autogenerated: do not edit this file -DROP TABLE IF EXISTS BATCH_STAGING_SEQ ; -DROP TABLE IF EXISTS TRADE_SEQ ; -DROP TABLE IF EXISTS CUSTOMER_SEQ ; -DROP TABLE IF EXISTS BATCH_STAGING ; -DROP TABLE IF EXISTS TRADE ; -DROP TABLE IF EXISTS CUSTOMER ; -DROP TABLE IF EXISTS PLAYERS ; -DROP TABLE IF EXISTS GAMES ; -DROP TABLE IF EXISTS PLAYER_SUMMARY ; - --- Autogenerated: do not edit this file - -CREATE TABLE CUSTOMER_SEQ (ID BIGINT NOT NULL) type=MYISAM; -INSERT INTO CUSTOMER_SEQ values(0); -CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT NOT NULL) type=MYISAM; -INSERT INTO BATCH_STAGING_SEQ values(0); -CREATE TABLE TRADE_SEQ (ID BIGINT NOT NULL) type=MYISAM; -INSERT INTO TRADE_SEQ values(0); - -CREATE TABLE BATCH_STAGING ( - ID BIGINT unsigned PRIMARY KEY , - JOB_ID BIGINT NOT NULL, - VALUE BLOB NOT NULL, - PROCESSED CHAR(1) NOT NULL -); - -CREATE TABLE TRADE ( - ID BIGINT unsigned PRIMARY KEY , - VERSION BIGINT, - ISIN VARCHAR(45) NOT NULL, - QUANTITY BIGINT, - PRICE DOUBLE, - CUSTOMER VARCHAR(45) -); - -CREATE TABLE CUSTOMER ( - ID BIGINT unsigned PRIMARY KEY , - VERSION BIGINT, - NAME VARCHAR(45), - CREDIT DOUBLE -); - -INSERT INTO customer (id, version, name, credit) VALUES (1, 0, 'customer1', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 100000); -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 -); - -CREATE TABLE GAMES ( - PLAYER_ID char(8) not null, - YEAR_NO BIGINT not null, - TEAM char(3) not null, - WEEK BIGINT not null, - OPPONENT char(3), - COMPLETES BIGINT, - ATTEMPTS BIGINT, - PASSING_YARDS BIGINT, - PASSING_TD BIGINT, - INTERCEPTIONS BIGINT, - RUSHES BIGINT, - RUSH_YARDS BIGINT, - RECEPTIONS BIGINT, - RECEPTIONS_YARDS BIGINT, - TOTAL_TD BIGINT -); - -CREATE TABLE PLAYER_SUMMARY ( - ID CHAR(8) NOT NULL, - YEAR_NO BIGINT NOT NULL, - COMPLETES BIGINT NOT NULL , - ATTEMPTS BIGINT NOT NULL , - PASSING_YARDS BIGINT NOT NULL , - PASSING_TD BIGINT NOT NULL , - INTERCEPTIONS BIGINT NOT NULL , - RUSHES BIGINT NOT NULL , - RUSH_YARDS BIGINT NOT NULL , - RECEPTIONS BIGINT NOT NULL , - RECEPTIONS_YARDS BIGINT NOT NULL , - TOTAL_TD BIGINT NOT NULL +-- Autogenerated: do not edit this file +DROP TABLE IF EXISTS BATCH_STAGING_SEQ ; +DROP TABLE IF EXISTS TRADE_SEQ ; +DROP TABLE IF EXISTS CUSTOMER_SEQ ; +DROP TABLE IF EXISTS BATCH_STAGING ; +DROP TABLE IF EXISTS TRADE ; +DROP TABLE IF EXISTS CUSTOMER ; +DROP TABLE IF EXISTS PLAYERS ; +DROP TABLE IF EXISTS GAMES ; +DROP TABLE IF EXISTS PLAYER_SUMMARY ; + +-- Autogenerated: do not edit this file + +CREATE TABLE CUSTOMER_SEQ (ID BIGINT NOT NULL) type=MYISAM; +INSERT INTO CUSTOMER_SEQ values(0); +CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT NOT NULL) type=MYISAM; +INSERT INTO BATCH_STAGING_SEQ values(0); +CREATE TABLE TRADE_SEQ (ID BIGINT NOT NULL) type=MYISAM; +INSERT INTO TRADE_SEQ values(0); + +CREATE TABLE BATCH_STAGING ( + ID BIGINT NOT NULL PRIMARY KEY , + JOB_ID BIGINT NOT NULL, + VALUE BLOB NOT NULL, + PROCESSED CHAR(1) NOT NULL +); + +CREATE TABLE TRADE ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + ISIN VARCHAR(45) NOT NULL, + QUANTITY BIGINT , + PRICE DOUBLE PRECISION , + CUSTOMER VARCHAR(45) +); + +CREATE TABLE CUSTOMER ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + NAME VARCHAR(45) , + CREDIT DOUBLE PRECISION +); + +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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 +); + +CREATE TABLE GAMES ( + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK BIGINT NOT NULL, + OPPONENT CHAR(3) , + COMPLETES BIGINT , + ATTEMPTS BIGINT , + PASSING_YARDS BIGINT , + PASSING_TD BIGINT , + INTERCEPTIONS BIGINT , + RUSHES BIGINT , + RUSH_YARDS BIGINT , + RECEPTIONS BIGINT , + RECEPTIONS_YARDS BIGINT , + TOTAL_TD BIGINT +); + +CREATE TABLE PLAYER_SUMMARY ( + ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + COMPLETES BIGINT NOT NULL , + ATTEMPTS BIGINT NOT NULL , + PASSING_YARDS BIGINT NOT NULL , + PASSING_TD BIGINT NOT NULL , + INTERCEPTIONS BIGINT NOT NULL , + RUSHES BIGINT NOT NULL , + RUSH_YARDS BIGINT NOT NULL , + RECEPTIONS BIGINT NOT NULL , + RECEPTIONS_YARDS BIGINT NOT NULL , + TOTAL_TD BIGINT NOT NULL ); \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/business-schema-oracle10g.sql b/spring-batch-samples/src/main/resources/business-schema-oracle10g.sql index c21dbc379..57b783124 100644 --- a/spring-batch-samples/src/main/resources/business-schema-oracle10g.sql +++ b/spring-batch-samples/src/main/resources/business-schema-oracle10g.sql @@ -1,86 +1,86 @@ --- Autogenerated: do not edit this file -DROP SEQUENCE BATCH_STAGING_SEQ ; -DROP SEQUENCE TRADE_SEQ ; -DROP SEQUENCE CUSTOMER_SEQ ; -DROP TABLE BATCH_STAGING ; -DROP TABLE TRADE ; -DROP TABLE CUSTOMER ; -DROP TABLE PLAYERS ; -DROP TABLE GAMES ; -DROP TABLE PLAYER_SUMMARY ; - --- Autogenerated: do not edit this file - -CREATE SEQUENCE CUSTOMER_SEQ; -CREATE SEQUENCE BATCH_STAGING_SEQ; -CREATE SEQUENCE TRADE_SEQ; - -CREATE TABLE BATCH_STAGING ( - ID NUMBER(38) PRIMARY KEY , - JOB_ID NUMBER(38) NOT NULL, - VALUE BLOB NOT NULL, - PROCESSED CHAR(1) NOT NULL -); - -CREATE TABLE TRADE ( - ID NUMBER(38) PRIMARY KEY , - VERSION NUMBER(38), - ISIN VARCHAR(45) NOT NULL, - QUANTITY NUMBER(38), - PRICE DOUBLE, - CUSTOMER VARCHAR(45) -); - -CREATE TABLE CUSTOMER ( - ID NUMBER(38) PRIMARY KEY , - VERSION NUMBER(38), - NAME VARCHAR(45), - CREDIT DOUBLE -); - -INSERT INTO customer (id, version, name, credit) VALUES (1, 0, 'customer1', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 100000); -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 -); - -CREATE TABLE GAMES ( - PLAYER_ID char(8) not null, - YEAR_NO NUMBER(38) not null, - TEAM char(3) not null, - WEEK NUMBER(38) not null, - OPPONENT char(3), - COMPLETES NUMBER(38), - ATTEMPTS NUMBER(38), - PASSING_YARDS NUMBER(38), - PASSING_TD NUMBER(38), - INTERCEPTIONS NUMBER(38), - RUSHES NUMBER(38), - RUSH_YARDS NUMBER(38), - RECEPTIONS NUMBER(38), - RECEPTIONS_YARDS NUMBER(38), - TOTAL_TD NUMBER(38) -); - -CREATE TABLE PLAYER_SUMMARY ( - ID CHAR(8) NOT NULL, - YEAR_NO NUMBER(38) NOT NULL, - COMPLETES NUMBER(38) NOT NULL , - ATTEMPTS NUMBER(38) NOT NULL , - PASSING_YARDS NUMBER(38) NOT NULL , - PASSING_TD NUMBER(38) NOT NULL , - INTERCEPTIONS NUMBER(38) NOT NULL , - RUSHES NUMBER(38) NOT NULL , - RUSH_YARDS NUMBER(38) NOT NULL , - RECEPTIONS NUMBER(38) NOT NULL , - RECEPTIONS_YARDS NUMBER(38) NOT NULL , - TOTAL_TD NUMBER(38) NOT NULL +-- Autogenerated: do not edit this file +DROP SEQUENCE BATCH_STAGING_SEQ ; +DROP SEQUENCE TRADE_SEQ ; +DROP SEQUENCE CUSTOMER_SEQ ; +DROP TABLE BATCH_STAGING ; +DROP TABLE TRADE ; +DROP TABLE CUSTOMER ; +DROP TABLE PLAYERS ; +DROP TABLE GAMES ; +DROP TABLE PLAYER_SUMMARY ; + +-- Autogenerated: do not edit this file + +CREATE SEQUENCE CUSTOMER_SEQ; +CREATE SEQUENCE BATCH_STAGING_SEQ; +CREATE SEQUENCE TRADE_SEQ; + +CREATE TABLE BATCH_STAGING ( + ID NUMBER(38) NOT NULL PRIMARY KEY , + JOB_ID NUMBER(38) NOT NULL, + VALUE BLOB NOT NULL, + PROCESSED CHAR(1) NOT NULL +); + +CREATE TABLE TRADE ( + ID NUMBER(38) NOT NULL PRIMARY KEY , + VERSION NUMBER(38) , + ISIN VARCHAR(45) NOT NULL, + QUANTITY NUMBER(38) , + PRICE NUMBER , + CUSTOMER VARCHAR2(45) +); + +CREATE TABLE CUSTOMER ( + ID NUMBER(38) NOT NULL PRIMARY KEY , + VERSION NUMBER(38) , + NAME VARCHAR2(45) , + CREDIT NUMBER +); + +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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 VARCHAR2(35) NOT NULL, + FIRST_NAME VARCHAR2(25) NOT NULL, + POS VARCHAR2(10) , + YEAR_OF_BIRTH NUMBER(38) NOT NULL, + YEAR_DRAFTED NUMBER(38) NOT NULL +); + +CREATE TABLE GAMES ( + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO NUMBER(38) NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK NUMBER(38) NOT NULL, + OPPONENT CHAR(3) , + COMPLETES NUMBER(38) , + ATTEMPTS NUMBER(38) , + PASSING_YARDS NUMBER(38) , + PASSING_TD NUMBER(38) , + INTERCEPTIONS NUMBER(38) , + RUSHES NUMBER(38) , + RUSH_YARDS NUMBER(38) , + RECEPTIONS NUMBER(38) , + RECEPTIONS_YARDS NUMBER(38) , + TOTAL_TD NUMBER(38) +); + +CREATE TABLE PLAYER_SUMMARY ( + ID CHAR(8) NOT NULL, + YEAR_NO NUMBER(38) NOT NULL, + COMPLETES NUMBER(38) NOT NULL , + ATTEMPTS NUMBER(38) NOT NULL , + PASSING_YARDS NUMBER(38) NOT NULL , + PASSING_TD NUMBER(38) NOT NULL , + INTERCEPTIONS NUMBER(38) NOT NULL , + RUSHES NUMBER(38) NOT NULL , + RUSH_YARDS NUMBER(38) NOT NULL , + RECEPTIONS NUMBER(38) NOT NULL , + RECEPTIONS_YARDS NUMBER(38) NOT NULL , + TOTAL_TD NUMBER(38) NOT NULL ); \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/business-schema-postgresql.sql b/spring-batch-samples/src/main/resources/business-schema-postgresql.sql index db2e78ddd..98ce011c4 100644 --- a/spring-batch-samples/src/main/resources/business-schema-postgresql.sql +++ b/spring-batch-samples/src/main/resources/business-schema-postgresql.sql @@ -1,86 +1,86 @@ --- Autogenerated: do not edit this file -DROP SEQUENCE BATCH_STAGING_SEQ ; -DROP SEQUENCE TRADE_SEQ ; -DROP SEQUENCE CUSTOMER_SEQ ; -DROP TABLE BATCH_STAGING ; -DROP TABLE TRADE ; -DROP TABLE CUSTOMER ; -DROP TABLE PLAYERS ; -DROP TABLE GAMES ; -DROP TABLE PLAYER_SUMMARY ; - --- Autogenerated: do not edit this file - -CREATE SEQUENCE CUSTOMER_SEQ; -CREATE SEQUENCE BATCH_STAGING_SEQ; -CREATE SEQUENCE TRADE_SEQ; - -CREATE TABLE BATCH_STAGING ( - ID BIGINT PRIMARY KEY , - JOB_ID BIGINT NOT NULL, - VALUE BYTEA NOT NULL, - PROCESSED CHAR(1) NOT NULL -); - -CREATE TABLE TRADE ( - ID BIGINT PRIMARY KEY , - VERSION BIGINT, - ISIN VARCHAR(45) NOT NULL, - QUANTITY BIGINT, - PRICE DOUBLE, - CUSTOMER VARCHAR(45) -); - -CREATE TABLE CUSTOMER ( - ID BIGINT PRIMARY KEY , - VERSION BIGINT, - NAME VARCHAR(45), - CREDIT DOUBLE -); - -INSERT INTO customer (id, version, name, credit) VALUES (1, 0, 'customer1', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 100000); -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 -); - -CREATE TABLE GAMES ( - PLAYER_ID char(8) not null, - YEAR_NO BIGINT not null, - TEAM char(3) not null, - WEEK BIGINT not null, - OPPONENT char(3), - COMPLETES BIGINT, - ATTEMPTS BIGINT, - PASSING_YARDS BIGINT, - PASSING_TD BIGINT, - INTERCEPTIONS BIGINT, - RUSHES BIGINT, - RUSH_YARDS BIGINT, - RECEPTIONS BIGINT, - RECEPTIONS_YARDS BIGINT, - TOTAL_TD BIGINT -); - -CREATE TABLE PLAYER_SUMMARY ( - ID CHAR(8) NOT NULL, - YEAR_NO BIGINT NOT NULL, - COMPLETES BIGINT NOT NULL , - ATTEMPTS BIGINT NOT NULL , - PASSING_YARDS BIGINT NOT NULL , - PASSING_TD BIGINT NOT NULL , - INTERCEPTIONS BIGINT NOT NULL , - RUSHES BIGINT NOT NULL , - RUSH_YARDS BIGINT NOT NULL , - RECEPTIONS BIGINT NOT NULL , - RECEPTIONS_YARDS BIGINT NOT NULL , - TOTAL_TD BIGINT NOT NULL +-- Autogenerated: do not edit this file +DROP SEQUENCE BATCH_STAGING_SEQ ; +DROP SEQUENCE TRADE_SEQ ; +DROP SEQUENCE CUSTOMER_SEQ ; +DROP TABLE BATCH_STAGING ; +DROP TABLE TRADE ; +DROP TABLE CUSTOMER ; +DROP TABLE PLAYERS ; +DROP TABLE GAMES ; +DROP TABLE PLAYER_SUMMARY ; + +-- Autogenerated: do not edit this file + +CREATE SEQUENCE CUSTOMER_SEQ; +CREATE SEQUENCE BATCH_STAGING_SEQ; +CREATE SEQUENCE TRADE_SEQ; + +CREATE TABLE BATCH_STAGING ( + ID BIGINT NOT NULL PRIMARY KEY , + JOB_ID BIGINT NOT NULL, + VALUE BYTEA NOT NULL, + PROCESSED CHAR(1) NOT NULL +); + +CREATE TABLE TRADE ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + ISIN VARCHAR(45) NOT NULL, + QUANTITY BIGINT , + PRICE DOUBLE PRECISION , + CUSTOMER VARCHAR(45) +); + +CREATE TABLE CUSTOMER ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + NAME VARCHAR(45) , + CREDIT DOUBLE PRECISION +); + +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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 +); + +CREATE TABLE GAMES ( + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK BIGINT NOT NULL, + OPPONENT CHAR(3) , + COMPLETES BIGINT , + ATTEMPTS BIGINT , + PASSING_YARDS BIGINT , + PASSING_TD BIGINT , + INTERCEPTIONS BIGINT , + RUSHES BIGINT , + RUSH_YARDS BIGINT , + RECEPTIONS BIGINT , + RECEPTIONS_YARDS BIGINT , + TOTAL_TD BIGINT +); + +CREATE TABLE PLAYER_SUMMARY ( + ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + COMPLETES BIGINT NOT NULL , + ATTEMPTS BIGINT NOT NULL , + PASSING_YARDS BIGINT NOT NULL , + PASSING_TD BIGINT NOT NULL , + INTERCEPTIONS BIGINT NOT NULL , + RUSHES BIGINT NOT NULL , + RUSH_YARDS BIGINT NOT NULL , + RECEPTIONS BIGINT NOT NULL , + RECEPTIONS_YARDS BIGINT NOT NULL , + TOTAL_TD BIGINT NOT NULL ); \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/business-schema-sqlserver.sql b/spring-batch-samples/src/main/resources/business-schema-sqlserver.sql new file mode 100644 index 000000000..8da24f5ad --- /dev/null +++ b/spring-batch-samples/src/main/resources/business-schema-sqlserver.sql @@ -0,0 +1,86 @@ +-- Autogenerated: do not edit this file +DROP TABLE BATCH_STAGING_SEQ ; +DROP TABLE TRADE_SEQ ; +DROP TABLE CUSTOMER_SEQ ; +DROP TABLE BATCH_STAGING ; +DROP TABLE TRADE ; +DROP TABLE CUSTOMER ; +DROP TABLE PLAYERS ; +DROP TABLE GAMES ; +DROP TABLE PLAYER_SUMMARY ; + +-- Autogenerated: do not edit this file + +CREATE TABLE CUSTOMER_SEQ (ID BIGINT IDENTITY); +CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT IDENTITY); +CREATE TABLE TRADE_SEQ (ID BIGINT IDENTITY); + +CREATE TABLE BATCH_STAGING ( + ID BIGINT NOT NULL PRIMARY KEY , + JOB_ID BIGINT NOT NULL, + VALUE IMAGE NOT NULL, + PROCESSED CHAR(1) NOT NULL +); + +CREATE TABLE TRADE ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + ISIN VARCHAR(45) NOT NULL, + QUANTITY BIGINT , + PRICE DOUBLE PRECISION , + CUSTOMER VARCHAR(45) +); + +CREATE TABLE CUSTOMER ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + NAME VARCHAR(45) , + CREDIT DOUBLE PRECISION +); + +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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 +); + +CREATE TABLE GAMES ( + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK BIGINT NOT NULL, + OPPONENT CHAR(3) , + COMPLETES BIGINT , + ATTEMPTS BIGINT , + PASSING_YARDS BIGINT , + PASSING_TD BIGINT , + INTERCEPTIONS BIGINT , + RUSHES BIGINT , + RUSH_YARDS BIGINT , + RECEPTIONS BIGINT , + RECEPTIONS_YARDS BIGINT , + TOTAL_TD BIGINT +); + +CREATE TABLE PLAYER_SUMMARY ( + ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + COMPLETES BIGINT NOT NULL , + ATTEMPTS BIGINT NOT NULL , + PASSING_YARDS BIGINT NOT NULL , + PASSING_TD BIGINT NOT NULL , + INTERCEPTIONS BIGINT NOT NULL , + RUSHES BIGINT NOT NULL , + RUSH_YARDS BIGINT NOT NULL , + RECEPTIONS BIGINT NOT NULL , + RECEPTIONS_YARDS BIGINT NOT NULL , + TOTAL_TD BIGINT NOT NULL +); \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/business-schema-sybase.sql b/spring-batch-samples/src/main/resources/business-schema-sybase.sql new file mode 100644 index 000000000..8defe1657 --- /dev/null +++ b/spring-batch-samples/src/main/resources/business-schema-sybase.sql @@ -0,0 +1,86 @@ +-- Autogenerated: do not edit this file +DROP TABLE BATCH_STAGING_SEQ ; +DROP TABLE TRADE_SEQ ; +DROP TABLE CUSTOMER_SEQ ; +DROP TABLE BATCH_STAGING ; +DROP TABLE TRADE ; +DROP TABLE CUSTOMER ; +DROP TABLE PLAYERS ; +DROP TABLE GAMES ; +DROP TABLE PLAYER_SUMMARY ; + +-- Autogenerated: do not edit this file + +CREATE TABLE CUSTOMER_SEQ (ID BIGINT IDENTITY); +CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT IDENTITY); +CREATE TABLE TRADE_SEQ (ID BIGINT IDENTITY); + +CREATE TABLE BATCH_STAGING ( + ID BIGINT NOT NULL PRIMARY KEY , + JOB_ID BIGINT NOT NULL, + VALUE IMAGE NOT NULL, + PROCESSED CHAR(1) NOT NULL +); + +CREATE TABLE TRADE ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT NULL, + ISIN VARCHAR(45) NOT NULL, + QUANTITY BIGINT NULL, + PRICE DOUBLE PRECISION NULL, + CUSTOMER VARCHAR(45) NULL +); + +CREATE TABLE CUSTOMER ( + ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT NULL, + NAME VARCHAR(45) NULL, + CREDIT DOUBLE PRECISION NULL +); + +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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) NULL, + YEAR_OF_BIRTH BIGINT NOT NULL, + YEAR_DRAFTED BIGINT NOT NULL +); + +CREATE TABLE GAMES ( + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK BIGINT NOT NULL, + OPPONENT CHAR(3) NULL, + COMPLETES BIGINT NULL, + ATTEMPTS BIGINT NULL, + PASSING_YARDS BIGINT NULL, + PASSING_TD BIGINT NULL, + INTERCEPTIONS BIGINT NULL, + RUSHES BIGINT NULL, + RUSH_YARDS BIGINT NULL, + RECEPTIONS BIGINT NULL, + RECEPTIONS_YARDS BIGINT NULL, + TOTAL_TD BIGINT NULL +); + +CREATE TABLE PLAYER_SUMMARY ( + ID CHAR(8) NOT NULL, + YEAR_NO BIGINT NOT NULL, + COMPLETES BIGINT NOT NULL , + ATTEMPTS BIGINT NOT NULL , + PASSING_YARDS BIGINT NOT NULL , + PASSING_TD BIGINT NOT NULL , + INTERCEPTIONS BIGINT NOT NULL , + RUSHES BIGINT NOT NULL , + RUSH_YARDS BIGINT NOT NULL , + RECEPTIONS BIGINT NOT NULL , + RECEPTIONS_YARDS BIGINT NOT NULL , + TOTAL_TD BIGINT NOT NULL +); \ No newline at end of file diff --git a/spring-batch-samples/src/main/sql/db2.properties b/spring-batch-samples/src/main/sql/db2.properties index 9e03eee38..5c58989a7 100644 --- a/spring-batch-samples/src/main/sql/db2.properties +++ b/spring-batch-samples/src/main/sql/db2.properties @@ -1,7 +1,10 @@ platform=db2 # SQL language oddities BIGINT = BIGINT -IDENTITY = +IDENTITY = +DOUBLE = DOUBLE PRECISION BLOB = BLOB +TIMESTAMP = TIMESTAMP +VARCHAR = VARCHAR # for generating drop statements... SEQUENCE = SEQUENCE diff --git a/spring-batch-samples/src/main/sql/derby.properties b/spring-batch-samples/src/main/sql/derby.properties index 89d610dbf..0c98e78fa 100644 --- a/spring-batch-samples/src/main/sql/derby.properties +++ b/spring-batch-samples/src/main/sql/derby.properties @@ -2,7 +2,10 @@ platform=db2 # SQL language oddities BIGINT = BIGINT IDENTITY = -GENERATED = GENERATED BY DEFAULT AS IDENTITY +GENERATED = GENERATED BY DEFAULT AS IDENTITY +DOUBLE = DOUBLE PRECISION BLOB = BLOB +TIMESTAMP = TIMESTAMP +VARCHAR = VARCHAR # for generating drop statements... SEQUENCE = TABLE diff --git a/spring-batch-samples/src/main/sql/hsqldb.properties b/spring-batch-samples/src/main/sql/hsqldb.properties index 1b6ceb2f0..220cd60e8 100644 --- a/spring-batch-samples/src/main/sql/hsqldb.properties +++ b/spring-batch-samples/src/main/sql/hsqldb.properties @@ -3,6 +3,9 @@ platform=hsqldb BIGINT = BIGINT IDENTITY = IDENTITY IFEXISTS = IF EXISTS +DOUBLE = DOUBLE PRECISION BLOB = LONGVARBINARY +TIMESTAMP = TIMESTAMP +VARCHAR = VARCHAR # for generating drop statements... SEQUENCE = TABLE diff --git a/spring-batch-samples/src/main/sql/init.sql.vpp b/spring-batch-samples/src/main/sql/init.sql.vpp index d6d01795e..4d9223c92 100644 --- a/spring-batch-samples/src/main/sql/init.sql.vpp +++ b/spring-batch-samples/src/main/sql/init.sql.vpp @@ -5,58 +5,58 @@ #sequence( "TRADE_SEQ" ) CREATE TABLE BATCH_STAGING ( - ID ${BIGINT} $!{IDENTITY} PRIMARY KEY $!{GENERATED}, + ID ${BIGINT} $!{IDENTITY} NOT NULL PRIMARY KEY $!{GENERATED}, JOB_ID ${BIGINT} NOT NULL, VALUE ${BLOB} NOT NULL, PROCESSED CHAR(1) NOT NULL ); CREATE TABLE TRADE ( - ID ${BIGINT} $!{IDENTITY} PRIMARY KEY $!{GENERATED}, - VERSION ${BIGINT}, + ID ${BIGINT} $!{IDENTITY} NOT NULL PRIMARY KEY $!{GENERATED}, + VERSION ${BIGINT} $!{NULL}, ISIN VARCHAR(45) NOT NULL, - QUANTITY ${BIGINT}, - PRICE DOUBLE, - CUSTOMER VARCHAR(45) + QUANTITY ${BIGINT} $!{NULL}, + PRICE ${DOUBLE} $!{NULL}, + CUSTOMER ${VARCHAR}(45) $!{NULL} ); CREATE TABLE CUSTOMER ( - ID ${BIGINT} $!{IDENTITY} PRIMARY KEY $!{GENERATED}, - VERSION ${BIGINT}, - NAME VARCHAR(45), - CREDIT DOUBLE + ID ${BIGINT} $!{IDENTITY} NOT NULL PRIMARY KEY $!{GENERATED}, + VERSION ${BIGINT} $!{NULL}, + NAME ${VARCHAR}(45) $!{NULL}, + CREDIT ${DOUBLE} $!{NULL} ); -INSERT INTO customer (id, version, name, credit) VALUES (1, 0, 'customer1', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (2, 0, 'customer2', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (3, 0, 'customer3', 100000); -INSERT INTO customer (id, version, name, credit) VALUES (4, 0, 'customer4', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); +INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); +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 + PLAYER_ID CHAR(8) NOT NULL PRIMARY KEY, + LAST_NAME ${VARCHAR}(35) NOT NULL, + FIRST_NAME ${VARCHAR}(25) NOT NULL, + POS ${VARCHAR}(10) $!{NULL}, + YEAR_OF_BIRTH ${BIGINT} NOT NULL, + YEAR_DRAFTED ${BIGINT} NOT NULL ); CREATE TABLE GAMES ( - PLAYER_ID char(8) not null, - YEAR_NO ${BIGINT} not null, - TEAM char(3) not null, - WEEK ${BIGINT} not null, - OPPONENT char(3), - COMPLETES ${BIGINT}, - ATTEMPTS ${BIGINT}, - PASSING_YARDS ${BIGINT}, - PASSING_TD ${BIGINT}, - INTERCEPTIONS ${BIGINT}, - RUSHES ${BIGINT}, - RUSH_YARDS ${BIGINT}, - RECEPTIONS ${BIGINT}, - RECEPTIONS_YARDS ${BIGINT}, - TOTAL_TD ${BIGINT} + PLAYER_ID CHAR(8) NOT NULL, + YEAR_NO ${BIGINT} NOT NULL, + TEAM CHAR(3) NOT NULL, + WEEK ${BIGINT} NOT NULL, + OPPONENT CHAR(3) $!{NULL}, + COMPLETES ${BIGINT} $!{NULL}, + ATTEMPTS ${BIGINT} $!{NULL}, + PASSING_YARDS ${BIGINT} $!{NULL}, + PASSING_TD ${BIGINT} $!{NULL}, + INTERCEPTIONS ${BIGINT} $!{NULL}, + RUSHES ${BIGINT} $!{NULL}, + RUSH_YARDS ${BIGINT} $!{NULL}, + RECEPTIONS ${BIGINT} $!{NULL}, + RECEPTIONS_YARDS ${BIGINT} $!{NULL}, + TOTAL_TD ${BIGINT} $!{NULL} ); CREATE TABLE PLAYER_SUMMARY ( diff --git a/spring-batch-samples/src/main/sql/mysql.properties b/spring-batch-samples/src/main/sql/mysql.properties index b86c7b6fe..5007b0ba9 100644 --- a/spring-batch-samples/src/main/sql/mysql.properties +++ b/spring-batch-samples/src/main/sql/mysql.properties @@ -1,9 +1,13 @@ platform=oracle10g # SQL language oddities BIGINT = BIGINT -IDENTITY = unsigned +IDENTITY = GENERATED = +VOODOO = type=InnoDB IFEXISTSBEFORE = IF EXISTS +DOUBLE = DOUBLE PRECISION BLOB = BLOB +TIMESTAMP = DATETIME +VARCHAR = VARCHAR # for generating drop statements... SEQUENCE = TABLE diff --git a/spring-batch-samples/src/main/sql/oracle10g.properties b/spring-batch-samples/src/main/sql/oracle10g.properties index 86bf7ec5b..0f3d18973 100644 --- a/spring-batch-samples/src/main/sql/oracle10g.properties +++ b/spring-batch-samples/src/main/sql/oracle10g.properties @@ -3,6 +3,9 @@ platform=oracle10g BIGINT = NUMBER(38) IDENTITY = GENERATED = +DOUBLE = NUMBER BLOB = BLOB +TIMESTAMP = TIMESTAMP +VARCHAR = VARCHAR2 # for generating drop statements... SEQUENCE = SEQUENCE diff --git a/spring-batch-samples/src/main/sql/postgresql.properties b/spring-batch-samples/src/main/sql/postgresql.properties index 3cd8f8ce3..68b7bddc1 100644 --- a/spring-batch-samples/src/main/sql/postgresql.properties +++ b/spring-batch-samples/src/main/sql/postgresql.properties @@ -3,6 +3,9 @@ platform=postgresql BIGINT = BIGINT IDENTITY = GENERATED = -BLOB = BYTEA +DOUBLE = DOUBLE PRECISION +BLOB = BYTEA +TIMESTAMP = TIMESTAMP +VARCHAR = VARCHAR # for generating drop statements... SEQUENCE = SEQUENCE diff --git a/spring-batch-samples/src/main/sql/sqlserver.properties b/spring-batch-samples/src/main/sql/sqlserver.properties new file mode 100644 index 000000000..9ab4484cb --- /dev/null +++ b/spring-batch-samples/src/main/sql/sqlserver.properties @@ -0,0 +1,10 @@ +# SQL language oddities +BIGINT = BIGINT +IDENTITY = +GENERATED = +DOUBLE = DOUBLE PRECISION +BLOB = IMAGE +TIMESTAMP = DATETIME +VARCHAR = VARCHAR +# for generating drop statements... +SEQUENCE = TABLE diff --git a/spring-batch-samples/src/main/sql/sqlserver.vpp b/spring-batch-samples/src/main/sql/sqlserver.vpp new file mode 100644 index 000000000..1c798e451 --- /dev/null +++ b/spring-batch-samples/src/main/sql/sqlserver.vpp @@ -0,0 +1,3 @@ +#macro (sequence $name)CREATE TABLE ${name} (ID BIGINT IDENTITY); +#end +#macro (notnull $name $type)ALTER COLUMN ${name} ${type} NOT NULL#end diff --git a/spring-batch-samples/src/main/sql/sybase.properties b/spring-batch-samples/src/main/sql/sybase.properties new file mode 100644 index 000000000..35d7c8d06 --- /dev/null +++ b/spring-batch-samples/src/main/sql/sybase.properties @@ -0,0 +1,11 @@ +# SQL language oddities +BIGINT = BIGINT +IDENTITY = +GENERATED = +DOUBLE = DOUBLE PRECISION +BLOB = IMAGE +TIMESTAMP = DATETIME +VARCHAR = VARCHAR +NULL = NULL +# for generating drop statements... +SEQUENCE = TABLE diff --git a/spring-batch-samples/src/main/sql/sybase.vpp b/spring-batch-samples/src/main/sql/sybase.vpp new file mode 100644 index 000000000..1c798e451 --- /dev/null +++ b/spring-batch-samples/src/main/sql/sybase.vpp @@ -0,0 +1,3 @@ +#macro (sequence $name)CREATE TABLE ${name} (ID BIGINT IDENTITY); +#end +#macro (notnull $name $type)ALTER COLUMN ${name} ${type} NOT NULL#end diff --git a/src/.project b/src/.project index 8d334fb3e..0496c168d 100644 --- a/src/.project +++ b/src/.project @@ -1,7 +1,18 @@ - src + spring-batch + + + + + + + pom.xml + 1 + SPRING_BATCH/pom.xml + + diff --git a/src/site/apt/articles.apt b/src/site/apt/articles.apt index 58fa7cf07..6f2ec2357 100644 --- a/src/site/apt/articles.apt +++ b/src/site/apt/articles.apt @@ -16,3 +16,13 @@ Spring Batch In the Media * http://blog.decaresystems.ie/index.php/2007/04/12/spring-batch/ * http://www.itweek.co.uk/itweek/news/2189502/accenture-launches-batch + + * http://www.theserverside.com/tt/articles/article.tss?l=SpringBatchOverview + + * http://www.springframework.org/node/698 + + * http://www.infoq.com/interviews/johnson-spring-portfolio + + * http://www.infoq.com/news/2008/06/spring-batch + + * http://blog.springsource.com/main/2008/05/30/running-a-spring-batch-job-in-the-springsource-aplication-platform diff --git a/src/site/apt/building.apt b/src/site/apt/building.apt index 7d2f73953..7301c0ba2 100644 --- a/src/site/apt/building.apt +++ b/src/site/apt/building.apt @@ -70,9 +70,8 @@ $ mvn test -DforkMode=never -Dtest=FootballJobFunctionalTests -Dplayer.file.name and feeds changes into other projects in your workspace. It is not recommended to use the Maven Eclipse plugin (<<>>) because it cannot track dependencies across the - Eclipse workspace. It will also create conflicting Eclipse - meta-data every time you run it, which will interfere with the meta - data under source control. + Eclipse workspace. It will also create Eclipse meta-data every time + you run it, conflicting with the version under source control. * Dependencies diff --git a/src/site/apt/cases/index.apt b/src/site/apt/cases/index.apt index 34f4a452b..c9844d4b3 100644 --- a/src/site/apt/cases/index.apt +++ b/src/site/apt/cases/index.apt @@ -29,7 +29,8 @@ Use Cases for Spring Batch * {{{parallel.html}Massively Parallel Batch Processing}}. Spring Batch 1.0 does not contain any implementations of this use case, but it is quite feasible to implement them using the framework as - a starting point. + a starting point. 1.1 has some prototype code under the Integration + module. * {{{restart.html}Manual Restart After Failure}} diff --git a/src/site/apt/cases/parallel.apt b/src/site/apt/cases/parallel.apt index 0da0d2122..c61cacf2a 100644 --- a/src/site/apt/cases/parallel.apt +++ b/src/site/apt/cases/parallel.apt @@ -149,7 +149,7 @@ Use Case: Massively Parallel Batch Processing Consider two examples: a file input source and a JDBC (SQL query) based input source. Each provides its own challenges. -*** File Data Source Partitioning +*** File Data Source * If each node reads the whole file there could be a performance issue. They would all need to have instructions about which lines @@ -163,16 +163,15 @@ Use Case: Massively Parallel Batch Processing * But if each input record can span a variable number of lines (not that unlikely in practice), then we can't use line numbers - * Maybe the best solution is to have a single process parsing the - file and sending it to a message queue, either formally using a - messaging infrastructure or informally using some sort of - roll-your-own approach. The integration pattern could then be a + * Maybe the best solution is to use middleware anyway. A single + process parses the file and sends it to a message queue, item by + item (or chunk by chunk). The integration pattern could then be a simple Eager Consumer, assuming that all records are processed independently. The messaging semantics would simply have to ensure that a consumer can roll back and return the input records to a queue for another consumer to retry. - For large batches a real messaging infrastructure (JMS etc.) with + * For large batches a real messaging infrastructure (JMS etc.) with guaranteed delivery would be a benefit, but might be seen as overkill for a system that didn't otherwise require it. In this case we could imagine the partitioning process being one of simply @@ -182,19 +181,15 @@ Use Case: Massively Parallel Batch Processing * What would parallel processing look like to the client? We can make it completely transparent if we assume that the client only - ever implements <<>> and <<>>. The - client code is unaware of the partitioning of its data source: - -+--- -batchTemplate.iterate(new ItemProviderRepeatCallback(provider, processor)); -+--- + ever implements <<>> and <<>>. The + client code is unaware of the partitioning of its data source. * Parallelisation could also take place at the level of the - <<>> - we could proxy the data provider and wrap it in + <<>> - we could proxy the data provider and wrap it in a partitioning proxy: +--- - @@ -260,7 +255,7 @@ batchTemplate.iterate(new ItemProviderRepeatCallback(provider, processor)); +--- + class="test.input.SqlInputItemReader"> SELECT * from T_INPUT