We have been able to render PDFs from a JRXML (with multiple lists designed sequentially - List A, followed by List B, followed by List C etc. (ALL LISTS HAVE THEIR OWN SQL TO RETRIEVE THE DATA)). Earlier we were running the process single threaded so the output was nice in the correct order (records of list A, followed by records of list B, followed by records of list C), but now we have implemented multi-threading on the process, so they run concurrently. But out of it, we are now getting the data messed up for a single thread case. The data is now appearing in the order in one of the case - some records of List B, some records of List A, (again) remaining records of List B, so on.
The approaches that we've tried so far are -
Separate JasperPrint objects for each thread. Also tried with both - first with same shared JasperReport object and then with separate one JasperReport object per thread. Both ways we are seeing this issue.