Spring / Spring Data Access
What are the different Spring propagation levels?
Propagation is the ability to decide how the business methods should be encapsulated in both logical or physical transactions.
There are 7 different propagation levels.
REQUIRED states that the same transaction will be used if there is an already opened transaction in the current bean method execution context and it creates a new transaction if one already does not exists.
REQUIRES_NEW states that a new physical transaction will always be created by the container.
The NESTED makes nested Spring transactions to use the same physical transaction but sets save-points between nested invocations so inner transactions may also rollback independently of outer transactions. This is applicable only to JDBC.
The MANDATORY states that an existing opened transaction must already exist. If not an exception will be thrown by the container.
The NEVER states that an existing opened transaction must not already exist. If a transaction exists an exception will be thrown by the container.
The NOT_SUPPORTED will execute outside of the scope of any transaction. If an opened transaction already exists it will be paused.
The SUPPORTS will execute in the scope of a transaction if an opened transaction already exists. If there isn't an already opened transaction the method will execute anyway but in a non-transactional way.
Dogecoin! Earn free bitcoins up to $250 now by signing up.
Earn bitcoins upto $250 (free), invest in other Cryptocurrencies when you signup with blockfi. Use the referral link: Signup now and earn!
Using BlockFi, don't just buy crypto - start earning on it. Open an interest account with up to 8.6% APY, trade currencies, or borrow money without selling your assets.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
More Related questions...