-
May 22nd, 2010, 08:51 PM
#1
Writing to the multiple databases
I have a requirement to load a file in two different databases. Is there any way to have multiple writers in single Step? Or i have to configure this as two seprate jobs.
-
May 24th, 2010, 03:42 AM
#2
you can have multiple writers for the same step by using a composite writer, but as each writer will write to its own database and Spring Batch uses the same transaction manager for a whole batch, you'll need to use JTA transactions (or use a feature like synonyms to let the database engine demarcate transactions on both databases). This will also coupled the writers together (a failure for one will imply a rollback for both).
Perhaps you should use 2 different jobs, especially if the writes on each writer should be decoupled.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules