How would you enable transactions in spring and what are their benefits?



How would you enable transactions in spring and what are their benefits?..

Answer / Shiv Kumar

To enable transactions in Spring, configure your beans with transactional attributes. This can be done at method-level using @Transactional annotation on the service layer methods or at class-level by defining a bean as transactional. Benefits of transactions include data consistency, isolation, durability, and rollback support.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

What is advice in spring?

1 Answers  


What is the use of spring boot application? : Spring Boot

1 Answers  


What is difference between hibernate and spring data jpa?

1 Answers  


How to integrate spring and hibernate using hibernatedaosupport?

1 Answers  


What are ways to inject dependency in spring?

1 Answers  


How to create an applicationcontext in a java program?

1 Answers  


What is meant by rmi?

1 Answers  


Is spring boot a mvc?

1 Answers  


What is @configuration in spring?

1 Answers  


Can we send an object as a response to the controller’s handler method?

1 Answers  


What is difference between spring and spring mvc?

1 Answers  


What is default isolation level in spring?

1 Answers  


Categories