When are declarative and programmatic transaction management used?



When are declarative and programmatic transaction management used?..

Answer / Sumit Kumar Yadav

Declarative Transaction Management (using annotations like @Transactional) is preferred when transactions are simple, consistent with the method-level boundaries, and easily defined using annotations. On the other hand, Programmatic Transaction Management (using APIs like PlatformTransactionManager) is useful for complex scenarios, such as nested transactions or custom transaction control.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

What is target object?

1 Answers  


Are spring beans stateless?

1 Answers  


What is spring java based configuration?

1 Answers  


How a spring is formed?

1 Answers  


Why do we use annotations?

1 Answers  


What is drivermanagerdatasource in spring?

1 Answers  


What is weaving in spring?

1 Answers  


Explain spring beans?

1 Answers  


What is object dependency in spring?

1 Answers  


What is difference between @resource and @autowired?

1 Answers  


Can we learn spring boot without spring? : Spring Boot

1 Answers  


What are bean wiring and @autowired annotation?

1 Answers  


Categories