From c5c909f2e8ae3f310f3c24270104fba94a2e9fef Mon Sep 17 00:00:00 2001 From: dsyer Date: Sun, 29 Aug 2010 07:15:59 +0000 Subject: [PATCH] BATCH-1604: add docs on unicode in repository --- src/site/docbook/reference/job.xml | 8 +++++++- .../docbook/reference/schema-appendix.xml | 19 +++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/site/docbook/reference/job.xml b/src/site/docbook/reference/job.xml index a885d1599..1cbfbaeb4 100644 --- a/src/site/docbook/reference/job.xml +++ b/src/site/docbook/reference/job.xml @@ -246,11 +246,17 @@ catch (JobRestartException e) { transaction-manager="transactionManager" isolation-level-for-create="SERIALIZABLE" table-prefix="BATCH_" + max-varchar-length="1000" /> None of the configuration options listed above are required except the id. If they are not set, the defaults shown above will be used. They - are shown above for awareness purposes. + are shown above for awareness purposes. The max-varchar-length defaults to 2500, which is the length of the long + VARCHAR + columns in the sample schema scripts used + to store things like exit code descriptions. If you don't modify the schema + and you don't use multi-bye characters you shouldn't need to change it.
Transaction Configuration for the JobRepository diff --git a/src/site/docbook/reference/schema-appendix.xml b/src/site/docbook/reference/schema-appendix.xml index 9bf439dec..4e0b0e736 100644 --- a/src/site/docbook/reference/schema-appendix.xml +++ b/src/site/docbook/reference/schema-appendix.xml @@ -40,13 +40,14 @@
Example DDL Scripts - The root of the Spring Batch Core JAR file contains example + The Spring Batch Core JAR file contains example scripts to create the relational tables for a number of database platforms (which are in turn auto-detected by the job repository factory bean or namespace equivalent). These scripts can be used as is, or modified with additional indexes and constraints as desired. The file names are in the form schema-*.sql, where "*" is the - short name of the target database platform. + short name of the target database platform. The scripts are in + the package org.springframework.batch.core.
@@ -551,6 +552,20 @@ INSERT INTO BATCH_JOB_SEQ values(0);
+
+ International and Multi-byte Characters + + If you are using multi-byte character sets (e.g. Chines or Cyrillic) + in your business processing, then those characters might need to be + persisted in the Spring Batch schema. Many users find that + simply changing the schema to double the length of the VARCHAR + columns is enough. Others prefer to configure the JobRepository with max-varchar-length half the value of the VARCHAR column length is enough. Some users have also reported that + they use NVARCHAR in place of VARCHAR + in their schema definitions. The best result will depend on the database + platform and the way the database server has been configured locally. +
+
Recommendations for Indexing Meta Data Tables