Questions tagged [compositeitemwriter]
20 questions
5
votes
1 answer
How does Spring Batch CompositeItemWriter manage transaction for delegate writers?
In the batch job step configuration, I plan to execute 2 queries in the writer, the 1st query is to update records in table A, then the 2nd query is to insert new records in table A again.
So far I think CompositeItemWriter can achieve my goal…

kgb
- 69
- 1
- 1
- 9
4
votes
1 answer
Spring Batch: How to create a Composite Item Writer?
I am using Spring Batch in Spring Boot application. The Spring Boot version is 1.3.5.RELEASE.
I am trying to use CompositeItemWriter so that the list of items will first be compressed/zipped by WriterOne and then be passed to WriterTwo where they…

Ashish Pancholi
- 4,569
- 13
- 50
- 88
1
vote
1 answer
Spring Batch Using CompositeItemWriter and CompositeItemProcessor
Using Spring Batch, I have to write in two different table, but using the same ItemReader.
I can't figure out how to use one ItemReader and a CompositeItemWriter.
Here's the JobConfiguration :
public class JobConfiguration {
@Autowired
…

YoyoPit
- 35
- 5
1
vote
1 answer
Spring batch : ClassifierCompositeItemWriter footer not getting called
I am using Spring Batch to write multiple reports.
Requirement is i will get records with BranchId and name. I need to create one file for each branchId and write respective data into that file along with some header and footer.
Example:
Student A =…

RKP2019
- 17
- 5
1
vote
1 answer
Writing to two different tables by Wrapping data from Processor Spring Batch
I have a requirement where I need to populate two different tables using two different Objects. I am wrapping (List and List) into CustEmp Object but I am unable to figure out on how to use CompositeItemWriter to write it using separate data…

faizan mohammed
- 11
- 2
0
votes
0 answers
Using AsyncItemWriter with CompositeItemWriter
Can AsyncItemWriter be used with CompositeItemWriter?
From the source code:
public class CompositeItemWriter implements ItemStreamWriter, InitializingBean
public interface ItemStreamWriter extends ItemStream, ItemWriter
public class…

pradhan
- 1
- 3
0
votes
0 answers
set two defferent entity, use the composite item processor is possible?
first of all
i appology my english is not good
where are 3 tables, A and B and C
get table A in read part,
and manufacture data,
and return B entity and C entity in processor
finally set B entity and C entity
is above can be just one step?
or have…

player0
- 1
0
votes
0 answers
In Spring Batch write skip count is not coming for Composite Item writer
I'm using spring batch composite item writer with four writers.
To increase the performance I added task executor.
In case on any exception the Skip count is not increasing.
public class ParallelCompositeWriter extends CompositeItemWriter

Velmurugan K
- 19
- 4
0
votes
1 answer
How do I get inserted key in ItemWriter to use it in another query Spring Batch
I am using Spring Batch, and I will do an Insert in ItemWriter and need to do an update in another table with the key inserted. How do I get the key to use it in the updateTableB ?
Thank you in advance.
@Bean
public CompositeItemWriter…

LTurTk
- 25
- 3
0
votes
0 answers
Spring Batch ResourceAware - Get resource name in ClassifierCompositeItemWriter
I've implemented ResourceAware in my domain object to set resource name when using MultiResourceItemReader. I'm successfully able to retrieve the resource name in Processor. However, I'm not able to access the resource name in FlatFileItemWriter…

pulikuttie
- 35
- 5
0
votes
1 answer
FlatfileItemWriter with Compositewriter example
I have a spring batch that will read the CSV file, then process and write it to another CSV file. I want to write the results into two different flat files based on the process result. Need to write successfully processed records in one file and…

Venkatesh Tech
- 1
- 1
0
votes
1 answer
Error with Spring batch Classifier Composite Item Writer
I have to basically produce multiple xml files for each file_id per currency ( ie. usd,zar ect) these transactions are all in 1 DB table. Do I create a composite writer for each currency and on my Item Processor I filter for each different currency…

Malume Ed
- 5
- 6
0
votes
1 answer
ClassifierCompositeItemWriter with AsyncItemWriter?
I am currently using AsyncItemWriter to write the processed student details input into my database table.
I recently got the requirement to write into several database tables based on criteria (if the student is in their last year, also write in a…

MEZesUBI
- 297
- 7
- 17
0
votes
1 answer
How to enable more detail in log for spring batch library
Good day,
I have a Spring batch, that using org.springframework.batch.item.support.CompositeItemWriter to write data into db.
The following is the writer code in my xml:

Panadol Chong
- 1,793
- 13
- 54
- 119
0
votes
1 answer
Can't use CompositeItemWriter: ItemWriter is not a ItemStream
I have the following code
@Bean
public JdbcBatchItemWriter writer1() {
return new JdbcBatchItemWriterBuilder()
.itemSqlParameterSourceProvider(new BeanPropertyItemSqlParameterSourceProvider<>())
…

mattogol
- 33
- 3