Skip to content

How to use @Retry on a @Transactional method? #618

Answered by Azquelt
HerrDerb asked this question in Q&A
Discussion options

You must be logged in to vote

Yep, fault tolerance is implemented using an interceptor and so the way it interacts with other interceptors depends on the priority. This was the reason the mp.fault.tolerance.interceptor.priority config property was added, using it to ensure Fault Tolerance occurs around the @Transactional interceptor (rather that within it) is what it was designed for (though I would set it lower than 100 to ensure that it happens first).

This will also change the order that fault tolerance occurs in relation to any other interceptors that are active in your application.

We had a bit of a debate over what the correct default priority was, there's unfortunately no right answer here, different users may …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by HerrDerb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants