Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

REQUIRES_NEW

Sumit Rawal answered on May 15, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


REQUIRES_NEW

0

PROPAGATION_REQUIRES_NEW creates a new transaction for the annotated method. If there is an existing transaction, it is suspended while the new transaction is created and committed. If the new transaction fails, it is rolled back, and the suspended transaction is resumed.

Let’s take a look at an example of how PROPAGATION_REQUIRES_NEW works. Suppose we have a service that performs two operations: one to save data to a database using Hibernate, and another to send a message to a RabbitMQ queue. We want to ensure that both operations are executed within their own transaction, such that if one operation fails, the other is not affected.

Popularity 1/10 Helpfulness 1/10 Language java
Source: Grepper
Tags: java
Link to this answer
Share Copy Link
Contributed on May 15 2023
Sumit Rawal
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.