Thanks for replying - I should point out the following though!
- I am not using Spring Batch at the moment - it is just a service method that will be triggered via a Quartz cron expression (every min).
- The filesize of each XML file is below 10k.
So, if there are 100 XML files which need to be converted and loaded into the DB then it is.
100files x 7s / 60s = nearly 12 minutes.
For each conversion the following occurs
- XML file is loaded by jdom
- 1 main domain object is created with from elements within XML
- 5 basic SQL selects are used to set other properties of main domain object
- 1 flat file is written
- 3 SQL inserts are fired
- XML file is moved to either success or fail directory
Currently this is just a unit test running locally which processes files from a samba share. This could be a bottleneck right here. I will use locally stored files for testing.
But my main question was really wether using Spring Batch could offer me any benefits (I know it supports error recovery etc) but at the same time I don't want to overcomplicate the project.