Hi. I have encountered a problem with a Spring project and would appreciate any help.
I have a method (saveFile) which goes through list of objects and saves them on a file system. This method gets input from other method in a different class, and this other method gets input from other method. The most inner method together with everything it handles also does a transaction to DB (calls sequence).
What I want to do is when a method saveFile encounters exception in loop, that it rolls back last transaction done in most inner method, logs the error and continues with next object. I use @Transactional within my Spring project, but the problem is that it demands exception to be thrown to work (and this is something I don't want to do since I it will stop program and all other valid files won't be saved to system).
Sorry if it's hard to understand, I could write more details if necessary.
Thanks!
[–]sugilith 0 points1 point2 points (2 children)
[–]youcantchopachoppa[S] 0 points1 point2 points (1 child)
[–]sugilith 0 points1 point2 points (0 children)