posted 9 years ago
Did you actually meet any problem?
Try forcing an exception while processing the 2nd item (after the first is already saved), all in one call (I assume that is what your post is about; 1 call, 2 processes, all or nothing commit).
If the first is committed to the database and the second is not, then you have a problem.
If that is the case, try encapsulate the processing by making a new method (and annotate it with @Transactional). This new method will take care of calling the 2 other methods concerned. That way, the 2 methods are in 1 single transaction, and ideally backout the whole thing appropriately if any single thing fails. Below is an example.