Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb048f3

Browse files
committed
BATCH-2234: Updated documentation to outline setup requirements as well as adding batch-*.properties files for the other database types
1 parent 39bb979 commit bb048f3

20 files changed

+315
-5
lines changed

spring-batch-core/src/main/resources/baseContext.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
1212

1313
<batch:job-repository data-source="dataSource" id="jobRepository"
14-
transaction-manager="transactionManager" table-prefix="BATCH_"/>
14+
transaction-manager="transactionManager" table-prefix="${batch.table.prefix}"/>
1515

1616
<bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
1717
<property name="jobRepository" ref="jobRepository"/>
@@ -28,8 +28,7 @@
2828
<property name="dataSource" ref="dataSource"/>
2929
</bean>
3030

31-
<bean id="dataSource"
32-
class="org.apache.commons.dbcp.BasicDataSource">
31+
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
3332
<property name="driverClassName" value="${batch.jdbc.driver}" />
3433
<property name="url" value="${batch.jdbc.url}" />
3534
<property name="username" value="${batch.jdbc.user}" />
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Placeholders batch.*
2+
# for Derby:
3+
batch.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
4+
batch.jdbc.url=jdbc:derby:derby-home/test;create=true
5+
batch.jdbc.user=app
6+
batch.jdbc.password=
7+
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer
8+
batch.schema.script=classpath:/org/springframework/batch/core/schema-derby.sql
9+
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-derby.sql
10+
batch.business.schema.script=
11+
batch.jdbc.testWhileIdle=true
12+
batch.jdbc.validationQuery=
13+
14+
15+
# Non-platform dependent settings that you might like to change
16+
batch.data.source.init=true
17+
batch.table.prefix=BATCH_
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Placeholders batch.*
2+
# for H2:
3+
batch.jdbc.driver=org.h2.Driver
4+
batch.jdbc.url=jdbc:h2:file:build/data/h2
5+
batch.jdbc.user=sa
6+
batch.jdbc.password=
7+
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.H2SequenceMaxValueIncrementer
8+
batch.schema.script=classpath:/org/springframework/batch/core/schema-h2.sql
9+
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-h2.sql
10+
batch.business.schema.script=
11+
batch.jdbc.testWhileIdle=true
12+
batch.jdbc.validationQuery=
13+
14+
15+
# Non-platform dependent settings that you might like to change
16+
batch.data.source.init=true
17+
batch.table.prefix=BATCH_
18+

spring-batch-core/src/main/resources/batch-hsql.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ batch.jdbc.validationQuery=
1717

1818
# Non-platform dependent settings that you might like to change
1919
batch.data.source.init=true
20+
batch.table.prefix=BATCH_
21+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Placeholders batch.*
2+
# for MySQL:
3+
batch.jdbc.driver=com.mysql.jdbc.Driver
4+
batch.jdbc.url=jdbc:mysql://localhost/test
5+
batch.jdbc.user=test
6+
batch.jdbc.password=test
7+
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.MySQLMaxValueIncrementer
8+
batch.schema.script=classpath:/org/springframework/batch/core/schema-mysql.sql
9+
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-mysql.sql
10+
batch.business.schema.script=
11+
batch.jdbc.testWhileIdle=true
12+
batch.jdbc.validationQuery=
13+
14+
15+
# Non-platform dependent settings that you might like to change
16+
batch.data.source.init=true
17+
batch.table.prefix=BATCH_
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Placeholders batch.*
2+
# for Oracle:
3+
batch.jdbc.driver=oracle.jdbc.OracleDriver
4+
batch.jdbc.url=jdbc:oracle:thin:@oracle:1521:xe
5+
batch.jdbc.user=spring
6+
batch.jdbc.password=spring
7+
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer
8+
batch.schema.script=classpath:/org/springframework/batch/core/schema-oracle10g.sql
9+
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-oracle10g.sql
10+
batch.business.schema.script=
11+
batch.jdbc.testWhileIdle=false
12+
batch.jdbc.validationQuery=
13+
14+
15+
# Non-platform dependent settings that you might like to change
16+
batch.data.source.init=true
17+
batch.table.prefix=BATCH_
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Placeholders batch.*
2+
# for Postgres:
3+
batch.jdbc.driver=org.postgresql.Driver
4+
batch.jdbc.url=jdbc:postgresql://localhost/samples
5+
batch.jdbc.user=postgres
6+
batch.jdbc.password=dba
7+
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer
8+
batch.schema.script=classpath:/org/springframework/batch/core/schema-postgresql.sql
9+
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-postgresql.sql
10+
batch.business.schema.script=
11+
batch.jdbc.testWhileIdle=false
12+
batch.jdbc.validationQuery=
13+
14+
15+
# Non-platform dependent settings that you might like to change
16+
batch.data.source.init=true
17+
batch.table.prefix=BATCH_
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Placeholders batch.*
2+
# for SQLFire:
3+
batch.jdbc.driver=com.vmware.sqlfire.jdbc.ClientDriver
4+
batch.jdbc.url=jdbc:sqlfire://localhost:1257/;update=true
5+
batch.jdbc.user=SAMPLES
6+
batch.jdbc.password=SAMPLES
7+
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer
8+
batch.schema.script=classpath:/org/springframework/batch/core/schema-sqlf.sql
9+
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-sqlf.sql
10+
batch.business.schema.script=
11+
batch.jdbc.testWhileIdle=false
12+
batch.jdbc.validationQuery=
13+
14+
15+
# Non-platform dependent settings that you might like to change
16+
batch.data.source.init=true
17+
batch.table.prefix=BATCH_
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Placeholders batch.*
2+
# for MS SQLServer:
3+
batch.jdbc.driver=net.sourceforge.jtds.jdbc.Driver
4+
batch.jdbc.url=jdbc:jtds:sqlserver://localhost:1433;instance=SQLEXPRESS
5+
batch.jdbc.user=sa
6+
batch.jdbc.password=sa
7+
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.SqlServerMaxValueIncrementer
8+
batch.schema.script=classpath*:/org/springframework/batch/core/schema-sqlserver.sql
9+
batch.drop.script=classpath*:/org/springframework/batch/core/schema-drop-sqlserver.sql
10+
batch.business.schema.script=
11+
batch.jdbc.testWhileIdle=false
12+
batch.jdbc.validationQuery=
13+
14+
15+
# Non-platform dependent settings that you might like to change
16+
batch.data.source.init=true
17+
batch.table.prefix=BATCH_
18+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Placeholders batch.*
2+
# for Sybase:
3+
batch.jdbc.driver=net.sourceforge.jtds.jdbc.Driver
4+
batch.jdbc.url=jdbc:jtds:sybase://dbhost:5000;databaseName=test
5+
batch.jdbc.user=spring
6+
batch.jdbc.password=spring
7+
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.SybaseMaxValueIncrementer
8+
batch.schema.script=classpath*:/org/springframework/batch/core/schema-sybase.sql
9+
batch.drop.script=classpath*:/org/springframework/batch/core/schema-drop-sybase.sql
10+
batch.business.schema.script=
11+
batch.jdbc.testWhileIdle=true
12+
batch.jdbc.validationQuery=
13+
14+
15+
# Non-platform dependent settings that you might like to change
16+
batch.data.source.init=true
17+
batch.table.prefix=BATCH_
18+

0 commit comments

Comments
 (0)