Help the world stop coronavirus! Stay home!

Prev Next

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.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Explain JdbcTemplate in Spring framework. Advantages of Spring JDBC Template over standard JDBC. How could I access Hibernate using Spring? How can we integrate Spring and Hibernate using HibernateDaoSupport? What are the advantages of transaction management in Spring Framework? Which Transaction management type is preferred in Spring? Explain DataAccessException in Spring. How do I configure DAO in Spring? What are the ORMs does Spring supports? List some of the no sql databases does spring support? Difference between Spring Data-JPA versus JPA. Give few examples of spring callbacks used in JdbcTemplate. What are the exceptions thrown by the Spring DAO classes? What is Spring Data JPA? What is SQLExceptionTranslator in Spring DAO? Difference between CrudRepository and JpaRepository interfaces in Spring Data JPA. Difference between Spring Data JPA and hibernate. How do I decide between JPA and Spring JdbcTemplate? What is PreparedStatementCreator in Spring Data framework? What is SQLProvider in Spring Data framework? What is BatchPreparedStatementSetter in Spring Data? Which is the better way of using JDBC in Spring? What template does Spring JDBC provide to access database? What are the native NativeJdbcExtractor in Spring? Explain Global and Local transactions in Spring. How do we roll back a declarative transaction in Spring? Different types of isolation in spring transaction management. Types of propagation in Spring transaction management. Spring: How do I rollback a declarative transaction? Spring: List out the role of TransactionDefinition interface. What are the benefits of the Spring transaction management ? Why Spring Declarative transaction management is preferred over programmatic? Spring @Transactional Annotation. What is the principle of Declarative transaction management in Spring? How does @Transactional works in Spring? How do you prevent SQL Injection in Java Code? Advantages of using @RepositoryRestResource annotation in Spring Data REST. When to use @RestController vs @RepositoryRestResource annotations in Spring. How do I unit test spring data repositories? What are the different isolation levels of DBMS? What is the difference between serializable and repeatable read isolation level? Explain serializable isolation level. What is the ISOLATION_DEFAULT in spring transaction management. What is the default propagation behavior of spring transaction management? Does the transaction rollback on exception in spring declarative transaction management? Explain NoRepositoryBean spring annotation. How do you handle High-volume Transaction Processing in J2EE? Explain Dirty read. Difference between non-repeatable read and phantom read. What is 2 phase commit? Difference between JDBC and connection pooling. When to use JTA and JPA transaction manager? Can I use multiple transaction managers within a spring application? Difference between Spring JtaTransactionManager and HibernateTransactionManager. Difference between HibernateTransactionManager and JpaTransactionManager. Difference between DataSourceTransactionManager and HibernateTransactionManager. Does Spring Transactional annotation support both global and local transactions? is Spring transactional annotation be applied only for public methods? Why applying Spring Transactional annotation on the concrete class or its methods is recommended rater than on interface? Explain proxy-target-class attribute of spring transactions. What are the default @Transactional settings? What are the different Spring propagation levels? What is Spring Data?
Show more question and Answers...

Web services

Comments & Discussions